Better shadows for rectangles and rounded rectangles (includes circles).
The shadow painting code is mostly from CardView library, but modified
heavily since CardView needs to draw the shadow inside view bounds.
Change-Id: I88c9f19b1c16839b8d6db6df2bebff126fa5a9a3
The date picker and calendar widgets show the current date. Comparing
widgets showing current date with a static golden image wasn't the best
idea.
- Change the widgets to custom widgets that set a predefined date/time
so that the rendering is independent of the system date.
- Change the layout slightly to make it look nicer.
- Update gradle plugin version.
Change-Id: Ia3fb4965a372a28087a0d8c9df40fd6779df6050
Use themed context to inflate the action bar when AppCompat is used.
Also fix minor issues exposed as a result.
- Set project callback when LayoutInflater is created by
LayoutInflater.from(context).
- Remove duplication of code to get base context from context wrapper.
Bug: http://b.android.com/159711
Change-Id: I379ba2ba71c0ef547460987c3aa5db521c7de967
1. Change tools attribute for layout manager from layoutManagerType to
LayoutManager.
2. Support classnames in the tools attribute.
This change doesn't try to supprt arbitrary classnames for now. The
reason for this is that the new layoutlib API is supposed to contain a
new method for inflating custom classes that are not views. This will
allow us to throw better error messages. Without the new API, trying for
different constructors, will result in a error messages being logged.
Change-Id: I3a31359c06b7452bfd973c3e5e54f9038acccfaa
1. Remove unused modes - makes the class more manageable, and missing
modes can always be readded from the git history.
2. Reuse the existing BlendComposite instances where possible.
3. Fix incorrect alpha computation for multiply mode.
4. Change the alpha computation for all blend modes to compenstate for
the fact that the color filter image that we create extends beyond the
image it is inteded to be applied to.
Change-Id: Iedebf289a23325ee4c6d406dcad46a9edb1855c7
Throw a better error message when resolving a hexadecimal color value
but the user gave a Color State List. The two are easy to confuse since
the only way to distinguish between the two is to look at the
definition.
Bug: http://b.android.com/70110
Change-Id: Ic78962bd0674a92296a0fdd0de184cfe4d85a8e4
When the display state is DOZE or DOZE_SUSPEND, assume this means
that the AP may go to sleep at any time so hold a wake lock for
a little while starting when traversals are scheduled to ensure
that the AP remains awake long enough to draw and post the frame
to the display hardware.
This patch is somewhat approximate but should be good enough for
most devices today.
Note that the implementation uses the window manager to ensure that
the window which wants to draw is actually visible before acquiring
the wake lock. There is a cost to this test (a round-trip) which
should not be significant today since we do not expect apps to draw
more than one frame or two while dozing. However, if we wanted to
support animations in general, we might want to optimize it or
eliminate the check altogether (since we can already account for
the app's use of the wake lock).
Another way to implement this functionality might be for the view
hierarchy to listen for the power manager to report that it has entered
a non-interactive power state before deciding to poke draw locks.
This would be somewhat more accurate than watching the display state.
Also, the draw lock timeout logic could be implemented more directly
instead of using an ordinary timed wake lock.
Bug: 18284212
Change-Id: I84b341c678303e8b7481bd1620e634fe82cc4350