Commit Graph

6781 Commits

Author SHA1 Message Date
Deepanshu Gupta
dbc7ca0bac Fix view outline for shadows in LayoutLib.
Set the bounds on the drawable before getting the view outline for
shadow. Also, reuse the temp outline object in AttachInfo rather than
allocating a new one each time.

Change-Id: I69793d38d60c5b9f9050569f2b22fbc7b90620bf
2015-04-27 17:19:35 +00:00
Doris Liu
7eaccbfbc2 Remove distance based animation duration API
Bug: 20500107

This reverts commit 0084e37095.

Change-Id: I57f1f3a22c5adfefd966447050b100a50e7141b2
2015-04-23 18:33:39 -07:00
Dianne Hackborn
799d8d0a0f Add "assist block" API.
To prevent assist structure traversal down the view hierarchy.

Change-Id: I50ce5f8de6f2eca3cb862de8eacd6422c40a2f7c
2015-04-22 17:36:48 -07:00
Mady Mellor
7c36a685fe Enable stylus scale by default for apps targeting MNC+
Bug: 20467919
Change-Id: Icadd45c8031e362d8101419c298133d59165939b
2015-04-22 11:52:31 -07:00
Mady Mellor
724866172a Merge "Remove mouse association in scaling, only do it for stylus, update doc." 2015-04-22 16:56:13 +00:00
Mathieu Chartier
7651dec5c9 am 097e1cdf: am 765d7c30: am ba6783b6: Merge "Update getExportedPropertyMethods to new reflection API"
* commit '097e1cdfb8f3520b22eafb2f0a7458010b1b3415':
  Update getExportedPropertyMethods to new reflection API
2015-04-22 00:00:23 +00:00
Mathieu Chartier
765d7c3048 am ba6783b6: Merge "Update getExportedPropertyMethods to new reflection API"
* commit 'ba6783b69a34b05123d1e3da51e6a11a9e0ca115':
  Update getExportedPropertyMethods to new reflection API
2015-04-21 23:26:49 +00:00
Chris Craik
6eededad96 Merge "More state cleanup in View#draw" 2015-04-21 21:47:27 +00:00
Chris Craik
b309825138 More state cleanup in View#draw
bug:20254728

Change-Id: I988077aac59165dd1fcb3ebbcd5abded586256b5
2015-04-21 14:45:53 -07:00
Mathieu Chartier
a8a6516f62 Update getExportedPropertyMethods to new reflection API
Bug: 19264997

Change-Id: Ife79c469fdb09f30e3aefcfc3e0ce5ed32303fce
2015-04-21 11:52:10 -07:00
Chris Craik
2099ee8ab5 Merge "Rename native DisplayListRenderer to DisplayListCanvas" 2015-04-21 16:30:08 +00:00
Joseph Cooper
b201110437 Merge "Introduces navigation keycodes." 2015-04-21 15:31:46 +00:00
Alan Viverette
33f0c93fa9 Merge "Update the popup reveal animation to more closely match window reveal" 2015-04-21 00:29:36 +00:00
Chris Craik
db663fe83f Rename native DisplayListRenderer to DisplayListCanvas
Change-Id: I33e6f8cc85da1e7da7ff7bf18d4ebde64222067a
2015-04-20 14:20:47 -07:00
Doris Liu
b1b0aa58bf Merge "Revert "Use real screen size to scale duration"" 2015-04-18 00:14:38 +00:00
Doris Liu
7513aab4df Revert "Use real screen size to scale duration"
This reverts commit 5ed54c743c.

Reverting to avoid build breakage.

Change-Id: Ib73056bb5a11e718cbc82db5917946bdf8db06dc
2015-04-18 00:14:14 +00:00
Doris Liu
14e317a33c Merge "Use real screen size to scale duration" 2015-04-17 23:40:55 +00:00
Doris Liu
5ed54c743c Use real screen size to scale duration
Duration scale based on screen size was using the area of the screen
excluding system bars to compare with our reference device's screen
size. This caused the following issues:
1) On baseline device (i.e N5) a scaling factor that is not 1 will be
   applied to the duration.
2) Scaling on the same device will be different in landscape vs.
   portrait, as the system bars take different amounts of space in
   different orienations.

This CL fixes both of the above issues.

Bug: 20309042

Change-Id: I9d1d0a471d968bee1330b80f0f69a0066d6a1860
2015-04-17 16:25:01 -07:00
Jeff Brown
f9978f863f Merge "Fix leaks due to GC circular references." 2015-04-17 22:27:03 +00:00
Jeff Brown
3b4049e79b Fix leaks due to GC circular references.
The DisplayEventReceiver and SensorManager event queue both get
leaked when the Looper thread they are attached to dies because
the Java object holds a strong reference to its native peer and
meanwhile the native peer holds a strong reference to the Java
object through JNI.

Fixed the issue by indirecting through a weak reference as was
done for InputEventReceiver some time ago.

Bug: 12455729
Change-Id: I3d80a2a190192d1a2981bf5ae0cad30f0f7688a5
2015-04-17 15:24:31 -07:00
John Reck
9d4efdf280 Revert "A bunch more cleanups"
This reverts commit c294d128d0.

Change-Id: Id1ebb236950f7c36c6d86e1dd95566d3a200748d
2015-04-17 20:47:27 +00:00
John Reck
7809f835ca Revert "Move AssetAtlas off of SkBitmap*"
This reverts commit 87ffb63d90.

Change-Id: I92adfcee454a0a19020cdd9e96a134be0ee529aa
2015-04-17 20:46:47 +00:00
John Reck
afbeb2c237 Merge "Revert "Remove Bitmap#getSkBitmap"" 2015-04-17 20:46:22 +00:00
John Reck
1ff961dd6d Revert "Remove Bitmap#getSkBitmap"
This reverts commit 4bd981ec53.

Change-Id: I5c92cd955c6e70e197dc5cbc5dfeed8369a24a31
2015-04-17 20:45:15 +00:00
Chris Craik
66b4139d6a Hide transient view API
bug:18621099

Change-Id: I25f64bc50bbbcf9fbbd8a4cdf81cacb61fa256f0
2015-04-17 10:09:05 -07:00
Chet Haase
c633d2f2b8 Add transient views to ViewGroup
This change allows clients to add temporary (transient) views to a
list of such views in any layout container. These views will be drawn at
the specified index when the container is being rendered, but will otherwise
not participate in the normal events of child views, such as focus,
input, and accessibility. The purpose of this functionality is to
enable better animations when views have been removed, such that clients
can add them back into containers temporarily while an animation runs,
then remove them when the animation finishes. This functionality is similar,
albeit a subset, of the what ViewGroupOverlay provides, but this API
allows clients to interleave these views with the other children in
the container, which allows correct drawing order. ViewGroupOverlay,
and the older internal mechanism used by the old animation package,
draw all of their views after a container is drawn, which pops
these temporary views on top of the other children in the container.

Issue #18621099 Enable View overlay to respect elevation and shadows

Change-Id: I530df69b406aa27b9f551f5724384f4dd1215a6f
2015-04-17 00:30:21 +00:00
Filip Gruszczynski
05636471fc Merge "Make UNSPECIFIED measure spec include size hint." 2015-04-17 00:03:22 +00:00
Adam Powell
54832cdb76 Merge "Clear ViewGroup nested scrolling axes when nested scrolling stops" 2015-04-16 22:58:39 +00:00
Jeff Brown
f647832bd4 Merge "Add support for disabling display scaling for development." 2015-04-16 22:55:58 +00:00
Adam Powell
d4a22d4edb Clear ViewGroup nested scrolling axes when nested scrolling stops
Bug 19517415

Change-Id: I3dc1c70d8894bd4478d7671c9dac2c9b17a45efa
2015-04-16 15:44:10 -07:00
Adam Powell
82d3cd69b5 Improve error reporting for buggy View subclasses
When a view doesn't call setMeasuredDimension, note the view ID
and class name as part of the exception message.

Bug 18037248

Change-Id: I1c5ed823378ad92a067801dc8c3be31b07c6f463
2015-04-16 14:54:10 -07:00
Filip Gruszczynski
b6824bf58a Make UNSPECIFIED measure spec include size hint.
Change-Id: I6c4f193d0590824c644e20e8af16d055a04ac9c9
2015-04-16 14:39:13 -07:00
Alan Viverette
95888c07e9 Update the popup reveal animation to more closely match window reveal
Hand-waves the default interpolators for efficiency's sake until we can
implement interpolator caching or preloading.

Change-Id: Ibc618a0c092b08a33fb91265ec15665c94831b6b
2015-04-16 13:27:50 -07:00
Mady Mellor
6895518d48 Remove mouse association in scaling, only do it for stylus, update doc.
Change-Id: I55d1eb8a38bb74f724a36bc6aa0e1a01e734275c
2015-04-16 12:50:53 -07:00
Mady Mellor
8d572dd1e2 Merge "New listener to recognize stylus button press gesture in GestureDetector" 2015-04-16 16:55:07 +00:00
Joseph Cooper
55b9ed42d3 Introduces navigation keycodes.
These four new navigation keycodes are intended to be used to
navigate a tree hierarchy or list of items.  They should be used to
allow the user to advance forward or backward within a list of
sibling items, expand the currently selected item to navigate the
item's children, or back out from the current item to its parent
item or state.

Change-Id: Ie2b85b3e4c682b0698599d7bcf64a53f6a52d776
2015-04-16 09:27:00 -07:00
John Reck
8560630596 Merge "Remove Bitmap#getSkBitmap" 2015-04-16 14:29:21 +00:00
Jeff Brown
d46747a1c6 Add support for disabling display scaling for development.
Added two new options to the wm command.

1. Set the screen size based on dips rather than pixels using the
current screen density.

eg. adb shell wm size 320dpx320dp

2. Disable automatic scaling of the contents of the display.
When combined with the previous command, this is useful for seeing
how the UI would behave if the screen remained at its current density
but changed physical size.

eg. adb shell wm scaling off

Bug: 19899223
Change-Id: I545f893ba4861494e995cf0457ebeba1050d28dc
2015-04-15 19:02:36 -07:00
John Reck
4bd981ec53 Remove Bitmap#getSkBitmap
Change-Id: Ifb9047b426122d3e5a445eb7a0eb3fce38dedf27
2015-04-15 15:56:12 -07:00
John Reck
8315167693 Merge "Move AssetAtlas off of SkBitmap*" 2015-04-15 21:23:19 +00:00
Wale Ogunwale
500c1b8177 Merge "Added TYPE_APPLICATION_ABOVE_SUB_PANEL window type." 2015-04-15 20:50:53 +00:00
John Reck
87ffb63d90 Move AssetAtlas off of SkBitmap*
Switched to SkPixelRef*

Change-Id: I4a1d9dc6c55c1ebcce6b0b8c585e69559e523898
2015-04-15 13:27:05 -07:00
Adam Powell
9790034e1a Fix a search bug for wrapped Window.Callbacks
Guard a call to a new method for Window.Callback for apps that have
provided their own preexisting implementations of this interface. Fall
back to the older, 0-arg method if this is the case.

Bug 20254504

Change-Id: If8a731c36de43b333e63455d78376af32ccb86ea
2015-04-15 13:12:52 -07:00
Chris Craik
4b46ed3b42 Merge "Simplify state in View#draw(canvas, parent, drawingTime)" 2015-04-15 16:37:37 +00:00
John Reck
f7a61483bc Merge "A bunch more cleanups" 2015-04-15 14:48:19 +00:00
Wale Ogunwale
0a4dc2258f Added TYPE_APPLICATION_ABOVE_SUB_PANEL window type.
TYPE_APPLICATION_ABOVE_SUB_PANEL will be displayed on top of their
attached window and any TYPE_APPLICATION_SUB_PANEL panels.

Bug: 20135562
Change-Id: I711de3c19c01432c44de205bf09934a8b23b53fd
2015-04-14 21:14:00 -07:00
Mady Mellor
a6b164548a New listener to recognize stylus button press gesture in GestureDetector
If there is a listener and the user touches the screen with the stylus
and presses the stylus button, onStylusButtonPress is called.

Bug: 19620479
Change-Id: If9246436ee465fd7299d0efb2d2f934944f59971
2015-04-14 18:03:34 -07:00
John Reck
c294d128d0 A bunch more cleanups
Switch a few places to using android::canvas
instead of SkCanvas as well which eliminated
some JNI

Change-Id: I8f98b56442a06362b82b984cd1bd3a92398d8dbc
2015-04-14 15:38:22 -07:00
Chris Craik
14c14ea49b Simplify state in View#draw(canvas, parent, drawingTime)
Simplify DisplayList / RenderNode state management in
View#draw (the ugly one).

Now, we simply differentiate between drawing with a RenderNode, and
drawing without it. This is because we expect drawing a view while
detached, or to a SW canvas should function the same.

Change-Id: I8b519222b651c4ec8211071c0a7b9b70b0a6a5cf
2015-04-14 09:13:20 -07:00
Roozbeh Pournader
b51222a301 Add more firstStrong alternatives for textDirection.
The current firstStrong value of textDirection is locale-dependent,
and can create problems when consistent display of text across
locales of potentially different direction is desired.

This adds two new values for textDirection, firstStrongLtr and
firstStrongRtl, which don't use the locale or the view's direction as
fallback, but explicit values of LTR or RTL.

Using firstStrongLtr also guarantees the exact algorithm defined in
the Unicode Bidirectional Algorithm to be used for determining
direction.

Bug: 13428339
Change-Id: I450d4f6b5197763ace7f9506c72cf87a90da4218
2015-04-13 15:01:43 -07:00