1788 Commits

Author SHA1 Message Date
Diego Perez
ffeb8117b1 am 9c13c8de: am bc47abe4: Merge "Make sure shaders use a color model compatible with the destination." into lmp-mr1-dev
* commit '9c13c8de8291aac69958a106248d3229ff90609f':
  Make sure shaders use a color model compatible with the destination.
2015-05-07 00:08:53 +00:00
Deepanshu Gupta
3dbd18cdfe am 872e9950: am 1f8e3de4: Merge "More layoutlib tests." into lmp-mr1-dev
* commit '872e9950a227128d323c24eb369863e16964493a':
  More layoutlib tests.
2015-05-07 00:08:45 +00:00
Deepanshu Gupta
9abe42324f am 7e4c1a92: am b4ca896f: Merge "RecyclerView in LayoutLib: better XML attrs." into lmp-mr1-dev
* commit '7e4c1a92b8f3ce02df0a1502be45c450308d81b7':
  RecyclerView in LayoutLib: better XML attrs.
2015-05-07 00:08:36 +00:00
Diego Perez
21246bd92f am 8e75e307: am 1bc7fb2d: Merge "Fix isThemeAppCompat NPE when using an invalid theme" into lmp-mr1-dev
* commit '8e75e307373a03dcbc55ce71be5b50f80e0474db':
  Fix isThemeAppCompat NPE when using an invalid theme
2015-05-07 00:08:29 +00:00
Deepanshu Gupta
cae76a70bf am 46241071: am 4f8a9996: Merge "Nullity annotations to some tests." into lmp-mr1-dev
* commit '4624107185135db9db6bfbfb3d0c3a0951c19ee1':
  Nullity annotations to some tests.
2015-05-07 00:08:22 +00:00
Deepanshu Gupta
b19325be07 am 2e3c41a4: am 92e79868: Merge "Fix title bar showing when not required." into lmp-mr1-dev
* commit '2e3c41a4e4fbb811cdafc754708d62cba7c6c1b6':
  Fix title bar showing when not required.
2015-05-07 00:08:01 +00:00
Deepanshu Gupta
047a28ec50 am 96437fb4: am 9aa600e7: Merge "LayoutLib: fix crash when shadow size <=0." into lmp-mr1-dev
* commit '96437fb4b05be2602bb0fa215988be646aec28fc':
  LayoutLib: fix crash when shadow size <=0.
2015-05-07 00:07:54 +00:00
Diego Perez
263e6dfa6a Merge "Make status and navigation bars widgets and usable from layouts" into lmp-mr1-dev 2015-05-06 23:52:06 +00:00
Diego Perez
19dbe50bb5 Merge "Move StatusBar to use statusBarColor theme attribute" into lmp-mr1-dev 2015-05-06 23:45:41 +00:00
Diego Perez
bc47abe4b4 Merge "Make sure shaders use a color model compatible with the destination." into lmp-mr1-dev 2015-05-06 23:43:50 +00:00
Deepanshu Gupta
1f8e3de40c Merge "More layoutlib tests." into lmp-mr1-dev 2015-05-06 23:43:15 +00:00
Deepanshu Gupta
b4ca896f05 Merge "RecyclerView in LayoutLib: better XML attrs." into lmp-mr1-dev 2015-05-06 23:42:56 +00:00
Diego Perez
1bc7fb2dcc Merge "Fix isThemeAppCompat NPE when using an invalid theme" into lmp-mr1-dev 2015-05-06 23:42:35 +00:00
Deepanshu Gupta
4f8a999682 Merge "Nullity annotations to some tests." into lmp-mr1-dev 2015-05-06 23:42:20 +00:00
Deepanshu Gupta
92e798682b Merge "Fix title bar showing when not required." into lmp-mr1-dev 2015-05-06 23:42:01 +00:00
Deepanshu Gupta
0aa004c3cf LayoutLib: fix crash when shadow size <=0.
Drawing empty rects results in IllegalArgumentException on Mac JRE 1.6.
Prevent that by checking the bounds before attempting to draw the rect.

Bug: 20687353
Change-Id: I45f48ee125196480bb6510cc49b24d2122bc3e48
2015-05-01 21:38:02 +00:00
Alan Viverette
5181f279c8 Fix layoutlib build breakage
Change-Id: Id3a9b79ac47ef27b04a96ff3ee50688bbb58f9c0
2015-04-30 15:57:42 -07:00
Diego Perez
d0546353a8 Move StatusBar to use statusBarColor theme attribute
Change-Id: Ic0d8f4520a6dcb7225a2947cc56dc06a7340d3ba
2015-04-30 16:28:06 +00:00
Diego Perez
8ff8de2cf2 Add new parameter to the render method to allow forcing a measure pass.
Change-Id: I60c09f3375fc85c257a449f4372220741e01db54
(cherry picked from commit c13aa0c035cd226d27323bc0e533632ba32f6a84)
2015-04-28 08:52:08 +00:00
Deepanshu Gupta
8381e2cdcc Merge "Fix view outline for shadows in LayoutLib." into mnc-dev 2015-04-27 23:20:35 +00:00
Raph Levien
c6abf5bff6 Expose drawTextRun publicly
For correct low-level drawing of low level text, a method that
includes context for shaping is necessary, and it's similarly useful
to provide the direction explicitly rather than running the BiDi
algorithm on the text. The drawTextRun method (in both char[] and
CharSequence variants) has provided this functionality for several
major releases but has been internal. This patch exposes the
methods publicly, and also improves the doc strings for both
the new method and some related ones.

Bug: 20193553
Change-Id: I9be33ca5ae3e7db2b69a56298400671d5ef8ad05
2015-04-27 15:33:03 -07:00
Chris Craik
1b60cc0529 Anti-alias by default
Change-Id: I19434717dd3af4fdcffbfcca2ffbb485dfebe644
2015-04-27 18:11:57 +00:00
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
Diego Perez
f3cb4ba213 Avoid caching mImage on the main render loop and use clipping.
+ Added a session flag that avoids caching mImage. This is useful when
mImage is just a Graphics2D wrapper that might change at any time.
+ Make GcSnapshot aware of the clipping so it doesn't need to render the
whole area if not needed.

Change-Id: Ie0134c2bc2741b5fa6648313864c851bbac066cf
(cherry picked from commit 2c5e85b303077d2120b428bd4c7e6ecb6970935b)
2015-04-22 09:51:06 +01:00
Diego Perez
9b39c49bfc Make status and navigation bars widgets and usable from layouts
This will allow the theme editor to render these components
separately.

Change-Id: I8b2e0e78039b44623152e34f68ffcdfab5aa9885
2015-04-21 17:50:28 +01:00
Diego Perez
6aa5a44d9b Fix isThemeAppCompat NPE when using an invalid theme
When the theme does not longer exists on the Android Studio side,
getDefaultTheme will return null causing isThemeAppCompat to crash.

Change-Id: I5a5c17126dce72e9872522643219b9438666bc04
2015-04-21 11:33:55 +01:00
Svet Ganov
e8b6debd9b Fix build for real
Change-Id: I5742226e9b873cd5a035f11be0e228188e215365
2015-04-17 15:49:53 -07:00
Svet Ganov
6762301a10 Fix build
Change-Id: If469dce767b492c3fcc1ad8cf7ab1041eb61096f
2015-04-17 15:14:54 -07:00
Jeff Brown
f647832bd4 Merge "Add support for disabling display scaling for development." 2015-04-16 22:55:58 +00:00
Deepanshu Gupta
a035dfbf8d More layoutlib tests.
- Add another layout including more widgets and thus testing layoutlib
  better.
- Update targetSdk Version to 22.
- Handling of dynamic ids (@+id/) in LayoutLibTestCallback is buggy.
  Since this is not a problem in Studio, and this is not testing the
  callback, work around the issue by declaring the ids in
  values/ids.xml.

Change-Id: I457c105e8556c4df13cd86da2250fe5fd37843a8
2015-04-16 15:50:31 -07:00
Deepanshu Gupta
2bc2daa74e RecyclerView in LayoutLib: better XML attrs.
- RecyclerView now supports XML attributes natively. Thus, remove the
   custom support via tools attribute. Users with older versions of
   RecyclerView should update.
 - Add Context.getPackageName() support used by RecyclerView.
 - Update SessionParamsFlags with the new changes and rename it to
   RenderParamsFlags.

The attribute behaves slightly different from the original tools
attribute. For usage, see commit 044b5b61e96 in frameworks/support.

Change-Id: I12073e37a2ba411558ca1d3e30c399e3d9a0b144
2015-04-16 12:00:30 -07:00
Deepanshu Gupta
eca0b3d9ec Nullity annotations to some tests.
Change-Id: I2939d7fab30f3b8fe32f2fdf720c630d677373ff
2015-04-16 12:00:30 -07:00
Deepanshu Gupta
666748728f Fix title bar showing when not required.
Bug: http://b.android.com/166383
Change-Id: I5ea051ffdbf9a2d73a83f62d56a0f4006b014348
2015-04-16 11:59:04 -07:00
Deepanshu Gupta
4967201a2c resolved conflicts for merge of 186fe7b1 to master
Change-Id: I60886d3e44ae23a11c8f129517df87ee29625ada
2015-04-16 11:18:41 -07:00
Deepanshu Gupta
c4affce9df am 1f3c7f3f: am f18ceefc: am cd6e00c6: Merge changes from topic \'layoutlib-api-15\' into lmp-mr1-dev
* commit '1f3c7f3f500bdbfd790c20872961d84ef617f066':
  Update golden image for tests.
  Update to using LayoutlibCallback.
  Remove implementation of deprecated method.
  Add @empty support.
2015-04-16 17:41:54 +00:00
Deepanshu Gupta
1f3c7f3f50 am f18ceefc: am cd6e00c6: Merge changes from topic \'layoutlib-api-15\' into lmp-mr1-dev
* commit 'f18ceefcf0d3cc91e74737e0a93f16775e3bf18b':
  Update golden image for tests.
  Update to using LayoutlibCallback.
  Remove implementation of deprecated method.
  Add @empty support.
2015-04-16 17:31:34 +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
Deepanshu Gupta
54862febaf Update golden image for tests.
Change-Id: If07edcbfb7016a6b80f4bd00cffab494f74bfc03
2015-04-15 18:20:57 -07:00
Deepanshu Gupta
37dbb8b7f3 Update to using LayoutlibCallback.
Change-Id: Ia89d418b0d40ca8efef8968a4a2a635616b945ac
2015-04-15 18:20:56 -07:00
Deepanshu Gupta
49ce36e175 Remove implementation of deprecated method.
BridgeResources.getDrawable(int) is not needed anymore, since the super
method is deprecated and it calls the alternative
getDrawable(int, Theme), which we override.

Change-Id: I00c0bfaef6c4167a787bb74990b91cebb951c847
2015-04-15 18:20:55 -07:00
Deepanshu Gupta
9ca9774726 Add @empty support.
Bug: http://b.android.com/162428
Change-Id: Id7a981de2fce21213e12cdabcce4104f146fd4d3
2015-04-15 18:20:47 -07:00
Diego Perez
2d3449f982 Make sure shaders use a color model compatible with the destination.
Change-Id: Iaf6e14bb86835c36a5b0c37519ac2ee794d10081
(cherry picked from commit 158ac454073a460375123d7d05152a7c6490efb6)
2015-04-15 14:23:09 +00:00
Tim Kilbourn
6a975b3c35 Save search context when dispatching onSearchRequested.
The InputDevice used to trigger the search is saved in a SearchEvent
so an application implementing onSearchRequested determine the device
triggering the search.

Bug: 15374820
Change-Id: If2cd14f77ce572a5ee131697cd63145fbea63f27
2015-04-13 09:39:24 -07:00
Deepanshu Gupta
1fd5d21e0d Merge "Be lenient in accepting version strings." 2015-04-06 20:56:05 +00:00
Deepanshu Gupta
d654b6f981 Be lenient in accepting version strings.
Don't throw exceptions for malformed version strings in font files, and
try to rename the font as is.

Change-Id: Ib4f74e68593abb5b551fbcb049484efc925a3d6e
2015-04-06 12:52:18 -07:00
Raph Levien
26d443aee4 Revert "Fix build: Revert "Record hyphens from Minikin and draw them""
This reverts commit 5a6eeb3cbe0896ddf4bdccc0b1a81d7aac49821e and
fixes the underlying issue (needed to @hide getHyphen() for subclasses
of Layout, not just the base class), and layoutlib changes for
checkbuild.

Change-Id: I7a2b5f20ae014ea8e224d8c4079cf9131e17e1c1
2015-03-30 15:13:50 -07:00
Deepanshu Gupta
22ed799622 am c1c3b88e: am 80d5c425: am fb37c97c: am 61bb0b4f: am 4e6ae02a: am 17bb697b: am ec8df9af: Fix tests for Java 6.
* commit 'c1c3b88ebd853425e931a5c07a045bae6ac1085f':
  Fix tests for Java 6.
2015-03-27 03:29:15 +00:00
Deepanshu Gupta
80d5c4250f am fb37c97c: am 61bb0b4f: am 4e6ae02a: am 17bb697b: am ec8df9af: Fix tests for Java 6.
* commit 'fb37c97c251cc9bef81dbf5b9acc58328656a980':
  Fix tests for Java 6.
2015-03-27 03:05:16 +00:00
Deepanshu Gupta
fb37c97c25 am 61bb0b4f: am 4e6ae02a: am 17bb697b: am ec8df9af: Fix tests for Java 6.
* commit '61bb0b4f58f794ff468f2cfaf958cb5cc0b09026':
  Fix tests for Java 6.
2015-03-27 02:58:47 +00:00
Deepanshu Gupta
4e6ae02a29 am 17bb697b: am ec8df9af: Fix tests for Java 6.
* commit '17bb697b3bce1b23137553829dd62e0e7c16b472':
  Fix tests for Java 6.
2015-03-27 01:09:53 +00:00