2218 Commits

Author SHA1 Message Date
Deepanshu Gupta
59a0f746eb am 51dd8878: am 60b52ee9: Fix class name for OverflowMenuButton [DO NOT MERGE]
* commit '51dd8878cb401128d730aecf9fe18c1e06221ac4':
  Fix class name for OverflowMenuButton [DO NOT MERGE]
2014-05-13 01:55:04 +00:00
Deepanshu Gupta
a51ac1bd06 am 503aaa48: am 7c6f6481: Add special system view cookie to OverflowButton. [DO NOT MERGE]
* commit '503aaa48e47538b69dc477372bc8c4ad2e955227':
  Add special system view cookie to OverflowButton. [DO NOT MERGE]
2014-05-13 01:55:02 +00:00
Deepanshu Gupta
09a42524dd am 30db282f: am 22de7c4c: Fix style warnings in RenderSessionImpl [DO NOT MERGE]
* commit '30db282f2a3692f8c98cb3bdbb0534ad348d1bd7':
  Fix style warnings in RenderSessionImpl [DO NOT MERGE]
2014-05-13 01:54:59 +00:00
Deepanshu Gupta
80f2914b4b am b67b1b45: am 094fd8ec: Add view cookies for action bar menus. [DO NOT MERGE]
* commit 'b67b1b450c1f35bd60882b7beec1dbfb47cd84f1':
  Add view cookies for action bar menus. [DO NOT MERGE]
2014-05-13 01:54:56 +00:00
Deepanshu Gupta
e686fbced9 am 2c8fea2a: am 56759be8: Overflow menu popup for Action Bar in Layoutlib [DO NOT MERGE]
* commit '2c8fea2ad425c4ba371bcb678949613dc8db72d0':
  Overflow menu popup for Action Bar in Layoutlib [DO NOT MERGE]
2014-05-13 01:54:53 +00:00
Deepanshu Gupta
21404483ad am 0bb06b91: am fe38489f: Action bar rendering in layoutlib [DO NOT MERGE]
* commit '0bb06b91e7be5b7f8c397295094aeaf1df8dbb09':
  Action bar rendering in layoutlib [DO NOT MERGE]
2014-05-13 01:54:50 +00:00
Deepanshu Gupta
b172b78051 am f3264738: am cc5340bc: Add missing dependency in layoutlib build file [DO NOT MERGE]
* commit 'f326473865d0860badcc39979b8965a6a2f28ae7':
  Add missing dependency in layoutlib build file [DO NOT MERGE]
2014-05-13 01:54:48 +00:00
Deepanshu Gupta
71acfa6c19 am 49d47a02: am 76dccb7f: Fix theme/style resolution in Layoutlib [DO NOT MERGE]
* commit '49d47a02e8c767d81815827a8170d015db6ea2d4':
  Fix theme/style resolution in Layoutlib [DO NOT MERGE]
2014-05-13 01:54:44 +00:00
Deepanshu Gupta
b90db3e6ab am de3b2c06: am 1ed75bde: Remove references to non-std Java classes. [DO NOT MERGE]
* commit 'de3b2c06ab05d1fbbf643b7ec3377d25997697d9':
  Remove references to non-std Java classes. [DO NOT MERGE]
2014-05-13 01:54:42 +00:00
Deepanshu Gupta
c2a6f3b1ed am 2f94c1db: am 6136af32: Fix visitFieldInsn in layoutlib_create. [DO NOT MERGE]
* commit '2f94c1db0d2c7e68891c3d96732fe39b199fac5d':
  Fix visitFieldInsn in layoutlib_create. [DO NOT MERGE]
2014-05-13 01:54:39 +00:00
Deepanshu Gupta
9b89fcc09d am ef9596a1: am 2bd65db1: Layoutlib tests now check methods return value [DO NOT MERGE]
* commit 'ef9596a1ea7c39cd07b81e87dca7f8f1941056b7':
  Layoutlib tests now check methods return value [DO NOT MERGE]
2014-05-13 01:54:36 +00:00
Deepanshu Gupta
bdd8dc332b am 52a86f17: am 7f56beb8: Support actionProviderClass attribute for menus [DO NOT MERGE]
* commit '52a86f17ea4940561c6d73ac226bef177a84c035':
  Support actionProviderClass attribute for menus [DO NOT MERGE]
2014-05-13 01:52:38 +00:00
Deepanshu Gupta
12e1ac320d am 680219f2: am f61bd002: Fix class name for OverflowMenuButton [DO NOT MERGE]
* commit '680219f2e3d67fa672bf3b8d7216a5bb61a0905d':
  Fix class name for OverflowMenuButton [DO NOT MERGE]
2014-05-13 01:52:35 +00:00
Deepanshu Gupta
40fea8b1bf am 4b5da86d: Fix DatePicker and Calendar widget in layoutlib. [DO NOT MERGE]
* commit '4b5da86d04200ba278b62ff99da91e212b87e9af':
  Fix DatePicker and Calendar widget in layoutlib. [DO NOT MERGE]
2014-05-13 01:52:32 +00:00
Deepanshu Gupta
6b9e07a412 am 78b176b3: am d558ebdb: Add special system view cookie to OverflowButton. [DO NOT MERGE]
* commit '78b176b34c9330aaa1142f922c222faa600eb9c8':
  Add special system view cookie to OverflowButton. [DO NOT MERGE]
2014-05-13 01:52:32 +00:00
Deepanshu Gupta
065ce2e8b3 am 5c166c9c: Layoutlib: Update the wifi icon in the status bar. [DO NOT MERGE]
* commit '5c166c9c04b6ea9d4955830e7ba277be71f17a6f':
  Layoutlib: Update the wifi icon in the status bar. [DO NOT MERGE]
2014-05-13 01:52:28 +00:00
Deepanshu Gupta
17c894d3d9 am a4384d4e: am a98121ef: Fix style warnings in RenderSessionImpl [DO NOT MERGE]
* commit 'a4384d4e8ccc78b2e005e3eb06dd2d3d81d781af':
  Fix style warnings in RenderSessionImpl [DO NOT MERGE]
2014-05-13 01:52:28 +00:00
Deepanshu Gupta
9f2f5e776a am 2d82586b: Fix CalendarView to show the right labels. [DO NOT MERGE]
* commit '2d82586b96593b1b3b5280d77d5ae9a09df9d1fd':
  Fix CalendarView to show the right labels. [DO NOT MERGE]
2014-05-13 01:52:25 +00:00
Deepanshu Gupta
616141bdcc am d9a137bd: am 77048379: Add view cookies for action bar menus. [DO NOT MERGE]
* commit 'd9a137bd84a0ebbcd34801da1442f8a6b0413c3e':
  Add view cookies for action bar menus. [DO NOT MERGE]
2014-05-13 01:52:25 +00:00
Deepanshu Gupta
06c4f23d73 am 64dc0380: Fix layoutlib [DO NOT MERGE]
* commit '64dc0380127047ffcf135b6848c9150aa8dbed85':
  Fix layoutlib [DO NOT MERGE]
2014-05-13 01:52:21 +00:00
Deepanshu Gupta
cdb87d8d83 am a59c27dd: Fix ClassCastException when rendering ListView [DO NOT MERGE]
* commit 'a59c27dd6674a31c875b0baa86519caec628ca2d':
  Fix ClassCastException when rendering ListView [DO NOT MERGE]
2014-05-13 01:52:18 +00:00
Deepanshu Gupta
edae4e6951 am 8a39c3af: Add orientation to configuration for layoutlib. [DO NOT MERGE]
* commit '8a39c3afb29f2540b05319042e758dd4d5f73a1e':
  Add orientation to configuration for layoutlib. [DO NOT MERGE]
2014-05-13 01:52:15 +00:00
Deepanshu Gupta
0e595741cf am 5fbb6118: am c014eb68: am 7a5f7265: Merge "Support actionProviderClass attribute for menus [DO NOT MERGE]" into klp-dev
* commit '5fbb6118b57ff522942de7e73dadd093e9c44f86':
  Support actionProviderClass attribute for menus [DO NOT MERGE]
2014-05-13 01:49:20 +00:00
Deepanshu Gupta
5fbb6118b5 am c014eb68: am 7a5f7265: Merge "Support actionProviderClass attribute for menus [DO NOT MERGE]" into klp-dev
* commit 'c014eb681bd700c24b9513c847cc6ee88c5410d7':
  Support actionProviderClass attribute for menus [DO NOT MERGE]
2014-05-13 01:47:56 +00:00
Deepanshu Gupta
c014eb681b am 7a5f7265: Merge "Support actionProviderClass attribute for menus [DO NOT MERGE]" into klp-dev
* commit '7a5f726525f597bf5dd65fd6bb106511715c2109':
  Support actionProviderClass attribute for menus [DO NOT MERGE]
2014-05-13 01:42:42 +00:00
Adam Lesinski
f000977620 Merge "Add support for building split APKs" 2014-05-12 18:12:35 +00:00
Adam Lesinski
fab50875b9 Add support for building split APKs
Build multiple APKs, each containing a disjoint subset
of configurations. These can then be loaded into the device
AssetManager and should operate as if they were never split.

Use the idea of building multiple sets of files, where each
set represents an APK. An ApkBuilder can place files
in a set based on its configuration, but you can actually
add directly to a set, in the case of the resources.arsc and
generated AndroidManifest.xml for splits.

Change-Id: Ic65d3f0ac1bbd290185695b9971d425c85ab1de3
2014-05-11 18:30:12 -07:00
Deepanshu Gupta
3a11562823 Add Navigation Bar to BridgeWindowManager [DO NOT MERGE]
Return the right value for presence of software navigation bar in
BridgeWindowManager. This is required to render the overflow menu button
correctly in the Action Bar.

Change-Id: I73de3b299f6a3a113425c436a59e800cd1d6b97f
2014-05-07 18:09:48 -07:00
Deepanshu Gupta
2d3fa7ba78 Support actionProviderClass attribute for menus [DO NOT MERGE]
The change adds support for view cookies for actionProviderClasses (for
example, ShareActionProvider) in the action bar menus.

This also provides a more robust search for the overflowMenuButton.

Change-Id: I316c8b9a69e2e337b41ba0fe4e61af9fe850f750
(cherry picked from commit 099f40a950a14b66005b17657d967ef080569a15)
2014-05-07 18:09:48 -07:00
Deepanshu Gupta
7bc363ba72 Add special system view cookie to OverflowButton. [DO NOT MERGE]
Add a special view cookie to enable the IDE to identify the overflow
menu button in the Action Bar.

Change-Id: Ida3ed776afb8c9fa8af23b73d4cf6d47eef0ab87
(cherry picked from commit 7c6f6481f46b8244406790604c5f8b3f712c369f)
2014-05-07 18:09:47 -07:00
Deepanshu Gupta
85f53c3335 Fix style warnings in RenderSessionImpl [DO NOT MERGE]
Change-Id: I9d3cb23e4ea692f737a3e3d6c18cc8de18b66a3c
(cherry-picked from commit 22de7c4c3d44e51aef6937e1b39540703ad01f5c)
2014-05-07 18:09:46 -07:00
Deepanshu Gupta
0f209967bf Add view cookies for action bar menus. [DO NOT MERGE]
The change adds the view cookies for the menus rendered in the action
bar. This enables the IDE to map the menu to the relevant XML Tag in the
menu xml and show the highlighting accordingly.

The change also contains a bugfix where a method wasn't renamed
properly.

Change-Id: Idcfc263a8ebe0a4f25afa3a1eb085fa628fd03ca
(cherry-picked from commit 094fd8ecb6f4b666be6c9e7332679bce28fdc3ca)
2014-05-07 18:09:46 -07:00
Deepanshu Gupta
f7e5794990 Overflow menu popup for Action Bar in Layoutlib [DO NOT MERGE]
In addition to the cherrypicked changes, appropriate changes due to
changes to com.android.internal.widget.ActionBarView are made.

The icon used in the Action Bar may not always be the right one due to
the above resolution.

Change-Id: Ib7cc314079099c010f7d53849e204db36c410357
(cherry-picked from commit 56759be8960ea1b5dc8b6de1810a84e2f10e2058)
2014-05-07 18:09:39 -07:00
Florin Malita
c677675e9c Encapsulate Canvas.mNativeCanvas
Currently, the native canvas is accessed/manipulated from several
unrelated classes.

In order to facilitate SaveFlags emulation, this CL encapsulates
the field and refactors its external users.

Two main changes:

* new getNativeCanvas() getter for use in Java-level clients.
* JNI canvas swappers (GraphicsBuffers, Surface, TextureView &
  AssetAtlasService) are refactored based on the exising/equivalent
  safeCanvasSwap() Canvas method.

Change-Id: I966bd4898f0838fb3699e226d3d3d51e0224ea97
2014-05-06 21:07:19 -04:00
Deepanshu Gupta
43b15371f9 Action bar rendering in layoutlib [DO NOT MERGE]
This also makes a couple of changes to the framework:
1. ShareActionProvider - Use edit mode to execute activity chooser code.
2. ActionBarImpl - add a new constructor for use by layoutlib.

This also relies on some changes to the plugin to pass the correct params.

Change-Id: Ia30fef816afd91ec1e439734d56b59b1323bfee2
(cherry-picked from fe38489f6734fefd0a216e9cfe12f8f978ff371f)
2014-05-06 14:02:48 -07:00
Deepanshu Gupta
770e40f839 Fix theme/style resolution in Layoutlib [DO NOT MERGE]
Change-Id: Icfb91e566666408802dadc0e2070991151b16b9d
(cherry picked from commit 76dccb7f436565136ff5e15b1ca57530940f5642)
2014-05-06 14:02:47 -07:00
Deepanshu Gupta
8766538846 Fix visitFieldInsn in layoutlib_create. [DO NOT MERGE]
The bug caused some classes to be missed when computing the dependencies
of the existing classes.

This change includes the new mock_android.jar compiled from the mock
sources again.

Change-Id: I7285ff67e016ce5d73a8550501f49acc73cfadfa
(cherry-picked from 6136af326e64037184a7a2a3ae60c399f04d631f)
2014-05-06 14:02:47 -07:00
Deepanshu Gupta
d915dcac36 Layoutlib tests now check methods return value [DO NOT MERGE]
The change is a cherry-pick from klp-dev.

The change also fixes the errors found by fixing the tests.

Change-Id: I87cef323c4eaee4e9f60475f01156b276593fa50
(cherry-picked from commit 2bd65db15fa6a265ccc4023161611088bc791b4e)
2014-05-06 14:02:47 -07:00
Deepanshu Gupta
877ae53586 Set default text style in layoutlib as NORMAL [DO NOT MERGE]
If a style doesn't specify text style (normal/bold/italic/bold-italic)
then default to normal instead of throwing an error.

Bug: http://b.android.com/61358
Change-Id: I0138c73807a5ff6e4d938a99ece3044333110aa1
(cherry-picked from bcbeaf83ca75e4a819377938fdf3ec1e07fa30a7)
2014-05-06 14:02:46 -07:00
Deepanshu Gupta
669792b303 Fix sans-serif-thin and sans-serif-light fonts in layoutlib. [DO NOT MERGE]
For these font families, text was always rendered as italic. This
changeset fixes the issue.

Bug: http://b.android.com/57221
Change-Id: Ic8a299bd1e555f5bb914cd3d2fe72917ec7f471a
(cherry-picked from 5be65fda15c6f66067da3cc623811427e9d541e4)
2014-05-06 14:02:46 -07:00
Deepanshu Gupta
cda89ca025 Fix a bug in Nine Patch library. [DO NOT MERGE]
The nine patches were not drawn correctly if they were not positioned at
the top left corner of the canvas.

Bug: http://b.android.com/29959
Change-Id: Icfed522ea07322a3ee9f3955067d3da26c4b0b5b
(cherry-picked from 5bb3414d148f1309dade9333fe9b89c8d1c2f308)
2014-05-06 14:02:46 -07:00
Deepanshu Gupta
a2b34c96f1 Optimize layout rendering in layoutlib [DO NOT MERGE]
The height of a layout should be zero if it is assigned a layout_weight.
This way, the layout is measured only once and prevents spurious errors.

Bug: https://code.google.com/p/android/issues/detail?id=58398
Change-Id: If49a7480e5eb82cb86780e00f2f5b65ee053fc2a
(cherry-picked from 5712b5fc3fec0dc376e84f660f2fe0d1102c0cbb)
2014-05-06 14:02:45 -07:00
Deepanshu Gupta
e183855c1e Add methods for Time_Delegate [DO NOT MERGE]
Bug: http://b.android.com/65359
Change-Id: I7c2d09286d6bcd9899444aaa5a4a5a342e39d923
(cherry-picked from 02cde9ceeb4c052ee273a5d809816dfd355ebb56)
2014-05-06 14:02:45 -07:00
Deepanshu Gupta
e5a2347bc6 Fix NPE in layoutlib. [DO NOT MERGE]
Change-Id: I36623304d83b344ea078044001577b8005a63c02
(cherry picked from commit 689c0dfe72a57c0555560012cbc6806375e7d4b7)
2014-05-06 14:02:45 -07:00
Deepanshu Gupta
30505abeb6 Fix text size in Fake Action Bar. [DO NOT MERGE]
The density multiplier was being applied twice to the title text in
the fake action bar.

Bug: 11436018
Change-Id: Id74c11037cb43d01f6cd79126623c84edfc37aaf
(cherry-picked from 083d1562e00631630b5594462ce4a867a3508d8d)
2014-05-06 14:02:44 -07:00
Deepanshu Gupta
5a7b3b65b6 Remove references to non-std Java classes. [DO NOT MERGE]
Do not add the non-standard Java classes. Updates the references to all
non-standard classes to new classes in
com.android.tools.layoulib.create package. This also treats
java.lang.AutoCloseable which is part of Java 7 similarly so that we can
still run on Java 6.

This also adapts the cherrypick for this branch by updating references
to the non-standard Java classes present in this branch. This also
includes the following change that includes some changes that the
original cherrypick missed.
Change-Id: I76c87c74ee088778b37d1a7a7d531e0fde5c758f
commit: 1ed75bde09275c9f2bd1f81830e381ea864ac7f5

Change-Id: Iac5b272652e2780c9bb72d19f415d150948ca589
(cherry picked from 80c668f2a076e91d887dbf77776cd503ff88b0b4)
2014-05-06 13:55:56 -07:00
Elliott Hughes
f3e7945c79 am 86768034: am b593ad60: am f1f28d1d: Merge "Skip resource files for locales en-XA and ar-XB during packaging if pseudolocalization was done automatically. This prevents attemts to add same resource twice."
* commit '867680342e12af59a26756f30cf817a131724943':
  Skip resource files for locales en-XA and ar-XB during packaging if pseudolocalization was done automatically. This prevents attemts to add same resource twice.
2014-05-06 02:34:40 +00:00
Elliott Hughes
867680342e am b593ad60: am f1f28d1d: Merge "Skip resource files for locales en-XA and ar-XB during packaging if pseudolocalization was done automatically. This prevents attemts to add same resource twice."
* commit 'b593ad60682a6f8c945c4c2ffc3d278df3f6e360':
  Skip resource files for locales en-XA and ar-XB during packaging if pseudolocalization was done automatically. This prevents attemts to add same resource twice.
2014-05-06 02:31:03 +00:00
Elliott Hughes
b593ad6068 am f1f28d1d: Merge "Skip resource files for locales en-XA and ar-XB during packaging if pseudolocalization was done automatically. This prevents attemts to add same resource twice."
* commit 'f1f28d1d86aea6dd1419e94aadf051e433914680':
  Skip resource files for locales en-XA and ar-XB during packaging if pseudolocalization was done automatically. This prevents attemts to add same resource twice.
2014-05-06 02:27:44 +00:00
Deepanshu Gupta
4b5da86d04 Fix DatePicker and Calendar widget in layoutlib. [DO NOT MERGE]
Issue: https://code.google.com/p/android/issues/detail?id=59732

Change-Id: I281b3fdad88c591281a3645592c84f3e2cb61d09
(cherry picked from commit 6335590aa8997944cc7fb358a315dbb9b789f87f)
2014-05-05 18:42:28 -07:00