1120 Commits

Author SHA1 Message Date
Deepanshu Gupta
bd9e181b29 Fix layout rendering for RTL locales [DO NOT MERGE]
This changeset adds the framework resources for RTL locales and mirrors
the layout if the application is RTL aware.

Use ICU to check the character orientation of the locale - right to left
or left to right. Set the layout direction on the top level layout
accordingly. Also, load the RTL resources for Nav Bar when the locale is
RTL.

Change-Id: I1ed0d516ab64120a0abca413ba678036661508f8
(cherry picked from commit eee0ea7a0b85ea6345eb7b8da5dbf17306c7339c)
2014-05-02 11:45:37 -07:00
Deepanshu Gupta
d4875e19f5 Add orientation to configuration for layoutlib. [DO NOT MERGE]
Update the configuration with the device orientation before rendering.

Change-Id: Icd40901204fd13f90b18353e53a15e25e5b2176c
(cherry picked from commit d97d60c0fa4613a47d591d45736299702be1cc7a)
2014-05-02 11:45:00 -07:00
Deepanshu Gupta
d25d33cdeb 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 28fa661f79e18fc9fc46bf112edded9c0d07696f)
2014-05-01 20:13:06 -07:00
Deepanshu Gupta
1f5e678c08 Support actionProviderClass attribute for menus.
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
2014-05-01 16:24:24 -07:00
Deepanshu Gupta
cd50f72946 am c046c767: am c0c96012: am 4b5fa4d3: Fix class name for OverflowMenuButton [DO NOT MERGE]
* commit 'c046c76739b210d912dae38bf945d60b8d69ab11':
  Fix class name for OverflowMenuButton [DO NOT MERGE]
2014-04-30 20:38:49 +00:00
Deepanshu Gupta
c046c76739 am c0c96012: am 4b5fa4d3: Fix class name for OverflowMenuButton [DO NOT MERGE]
* commit 'c0c96012c667d1d91d8f6b763df45e566cae0eaf':
  Fix class name for OverflowMenuButton [DO NOT MERGE]
2014-04-30 20:35:04 +00:00
Deepanshu Gupta
4b5fa4d318 Fix class name for OverflowMenuButton [DO NOT MERGE]
Change-Id: Ie3e709e7aadb2193397df8befef0c55624d7e4e3
2014-04-29 19:37:09 -07:00
Deepanshu Gupta
4bf3c93068 am 92bc0753: am 8c15cd0d: am c967d8dc: Add special system view cookie to OverflowButton. [DO NOT MERGE]
* commit '92bc07534e511b9afa7edaffe867d2674c504d73':
  Add special system view cookie to OverflowButton. [DO NOT MERGE]
2014-04-30 00:41:26 +00:00
Deepanshu Gupta
92bc07534e am 8c15cd0d: am c967d8dc: Add special system view cookie to OverflowButton. [DO NOT MERGE]
* commit '8c15cd0dc1d04490b82fd7d8da7611ff3219a1f0':
  Add special system view cookie to OverflowButton. [DO NOT MERGE]
2014-04-30 00:38:35 +00:00
Deepanshu Gupta
c967d8dc62 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 674af92fd3a618695448ff88568b03390e90bc66)
2014-04-29 16:49:21 -07:00
Deepanshu Gupta
d1084cc025 Add missing native methods. [DO NOT MERGE]
Also contains fixes for native methods specific to the branch.

Change-Id: I7b34e2ec0164520efc658053a80f307791a992b1
(cherry-picked from commit: 279c00e8e0abb20f7e10577c77937c058da080bf)
2014-04-28 15:18:05 -07:00
Deepanshu Gupta
b5cdfd97a5 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 1b87390c9426c4bc9119829e9375d712dfde11c3)
2014-04-25 19:45:33 -07:00
Deepanshu Gupta
20e0695b55 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 4ccc4bd54f85d86818f61d728c6361d2003ddd8e)
2014-04-25 19:22:14 -07:00
Deepanshu Gupta
3c00b28bf6 Fix theme/style resolution in Layoutlib [DO NOT MERGE]
Cherry picked from klp-dev from
Change-Id: If1e7187645f0b0388f7b97d742395efd228b347a which was
cherrypicked from master with the following

Change-Id: Icfb91e566666408802dadc0e2070991151b16b9d
(cherry picked from commit f1e7187645f0b0388f7b97d742395efd228b347a)
2014-04-25 18:58:15 -07:00
Deepanshu Gupta
b85d30a2c8 Add missing dependency in layoutlib build file [DO NOT MERGE]
Add missing dependency on built_ext_data

Change-Id: I4e7cca7f6cbc7f5b7416ac9b85a9aec01e61ecd4
(cherry-picked from commit e345507ca4b7b83c6e0446788f4404eb697f945b)
2014-04-25 18:55:47 -07:00
Deepanshu Gupta
f8144032d1 Fix visitFieldInsn in layoutlib_create. [DO NOT MERGE]
The bug caused some classes to be missed when computing the dependencies
of the existing classes.

Change-Id: I7285ff67e016ce5d73a8550501f49acc73cfadfa
(cherry-picked from 6f9baea47757fef4745de434e09bd552fddc1f03)
2014-04-25 18:53:38 -07:00
Deepanshu Gupta
89fdc0c556 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 bdd0ad79b9b027280bd371c7b6795b04ed89ac8f)
2014-04-25 18:50:39 -07:00
Deepanshu Gupta
d4f0073f48 Remove references to java package class Objects. [DO NOT MERGE]
Remove references to Java 7 class java.util.Objects and replace it with
a new class that can be loaded on Java 6.

Change-Id: Ibbd9b20b8bc89e247f1d0c48d743d06d1a4f0704
(cherry-picked from commit 45f5cd49fa898a59484edfd8e291dbe10df82db2)
2014-04-25 18:49:40 -07:00
Deepanshu Gupta
674af92fd3 Add special system view cookie to OverflowButton.
Add a special view cookie to enable the IDE to identify the overflow
menu button in the Action Bar.

Change-Id: Ida3ed776afb8c9fa8af23b73d4cf6d47eef0ab87
2014-04-25 12:24:25 -07:00
Deepanshu Gupta
8f9d92c4ca am 7406e4b8: am 7947ec71: am b64732d9: Merge "Fix style warnings in RenderSessionImpl [DO NOT MERGE]" into klp-dev
* commit '7406e4b8102ffd71affd55a9f453c0ecce13a097':
  Fix style warnings in RenderSessionImpl [DO NOT MERGE]
2014-04-24 01:36:22 +00:00
Deepanshu Gupta
057dca97d9 am 1668ae8d: am a019e772: am 6aaea1bd: Merge "Fix visitFieldInsn in layoutlib_create. [DO NOT MERGE]" into klp-dev
* commit '1668ae8d2a29b491c3ae421c5b0eca101fb10824':
  Fix visitFieldInsn in layoutlib_create. [DO NOT MERGE]
2014-04-24 01:36:18 +00:00
Deepanshu Gupta
5dee1a093a am e17ed922: am 126f4057: am 5ba2f230: Add view cookies for action bar menus. [DO NOT MERGE]
* commit 'e17ed922001cf70c48969eb7b10ee2e2557b41f9':
  Add view cookies for action bar menus. [DO NOT MERGE]
2014-04-24 01:36:14 +00:00
Deepanshu Gupta
7406e4b810 am 7947ec71: am b64732d9: Merge "Fix style warnings in RenderSessionImpl [DO NOT MERGE]" into klp-dev
* commit '7947ec715d8b4a0c82135553abb4947b61bf802b':
  Fix style warnings in RenderSessionImpl [DO NOT MERGE]
2014-04-24 01:31:24 +00:00
Deepanshu Gupta
1668ae8d2a am a019e772: am 6aaea1bd: Merge "Fix visitFieldInsn in layoutlib_create. [DO NOT MERGE]" into klp-dev
* commit 'a019e77252f86962b9803042c01b897f7f1aa89f':
  Fix visitFieldInsn in layoutlib_create. [DO NOT MERGE]
2014-04-24 01:31:20 +00:00
Deepanshu Gupta
e17ed92200 am 126f4057: am 5ba2f230: Add view cookies for action bar menus. [DO NOT MERGE]
* commit '126f4057a06756fbb1c194b5d9d40f9f922d14ee':
  Add view cookies for action bar menus. [DO NOT MERGE]
2014-04-24 01:31:15 +00:00
Deepanshu Gupta
b64732d977 Merge "Fix style warnings in RenderSessionImpl [DO NOT MERGE]" into klp-dev 2014-04-24 01:21:55 +00:00
Deepanshu Gupta
6aaea1bd4a Merge "Fix visitFieldInsn in layoutlib_create. [DO NOT MERGE]" into klp-dev 2014-04-24 01:21:46 +00:00
Deepanshu Gupta
7d3ae4f17d Bug fix in layoutlib
Renaming a method wasn't completed properly.
The bug was introduced in the following change:
Idcfc263a8ebe0a4f25afa3a1eb085fa628fd03ca
(1001961f904bac5294aaf73a47c2497aa764bf7f)

Change-Id: I698437b428d696c656e2268ded654a612a3e0c80
2014-04-23 18:07:07 -07:00
Deepanshu Gupta
1ea1b21acd Fix style warnings in RenderSessionImpl [DO NOT MERGE]
Change-Id: I9d3cb23e4ea692f737a3e3d6c18cc8de18b66a3c
(cherry-picked from commit fbfeb1a90b6f8f3966c60a69d50ce8f608d9d861)
2014-04-23 18:04:26 -07:00
Deepanshu Gupta
5ba2f230fa 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 1001961f904bac5294aaf73a47c2497aa764bf7f)
2014-04-23 18:04:21 -07:00
Deepanshu Gupta
6f9baea477 Fix visitFieldInsn in layoutlib_create. [DO NOT MERGE]
The bug caused some classes to be missed when computing the dependencies
of the existing classes.

Change-Id: I7285ff67e016ce5d73a8550501f49acc73cfadfa
(cherry-picked from 4a0f93bd32b8dd9b3c351680ad82e461d5111f38)
2014-04-23 16:11:57 -07:00
Deepanshu Gupta
fbfeb1a90b Fix style warnings in RenderSessionImpl
Change-Id: I9d3cb23e4ea692f737a3e3d6c18cc8de18b66a3c
2014-04-23 13:07:44 -07:00
Deepanshu Gupta
1001961f90 Add view cookies for action bar menus.
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.

Change-Id: Idcfc263a8ebe0a4f25afa3a1eb085fa628fd03ca
2014-04-23 12:27:30 -07:00
Deepanshu Gupta
76bc2bb4c7 Merge "Update Matrix_Delegate native methods." 2014-04-22 23:47:58 +00:00
Deepanshu Gupta
6416152f7e am be06a418: am cf5c3fc7: am 53b7df19: Merge "Add missing ICU_Delegate methods."
* commit 'be06a4182b9ff44a276f56d04b907672ee9e149a':
  Add missing ICU_Delegate methods.
2014-04-22 23:19:13 +00:00
Deepanshu Gupta
be06a4182b am cf5c3fc7: am 53b7df19: Merge "Add missing ICU_Delegate methods."
* commit 'cf5c3fc70d4dcd5dc3c6054d0f7415ded0070e4f':
  Add missing ICU_Delegate methods.
2014-04-22 23:15:05 +00:00
Deepanshu Gupta
e2b67777ad Add missing ICU_Delegate methods.
Update the ICU_Delegate to add methods originally added in
I5de58be7e8a701f2c40182ea54bceff85ec1aad2

Change-Id: I536834fe76cbc7dae05580182fee1bea956e3e77
2014-04-21 14:33:33 -07:00
Deepanshu Gupta
385c6b3b6c Update Matrix_Delegate native methods.
Update the Matrix_Delegate native methods in layoutlib. The original
change is I5cdcea827ebff587df0bbddc0965e3e0fbf48002.

Change-Id: I2c94741fdaeb0c2279caefee0188f432267bb37d
2014-04-21 14:28:56 -07:00
Deepanshu Gupta
311efc146c Merge "Add DisplayManager service to BridgeContext" 2014-04-18 23:11:57 +00:00
Deepanshu Gupta
664d6f1fe4 Add DisplayManager service to BridgeContext
ViewRoot now holds a reference to the DisplayManager. The change updates
the BridgeContext to provide the DisplayManager instance.

Change-Id: I4a5f00eda337939c72bad47b0ca6a7403454228d
2014-04-18 16:03:11 -07:00
Deepanshu Gupta
08ea918c86 Add isElegantHeight to Layoutlib
Add the native stub methods for isElegantHeight in Paint.

Change-Id: Iaddde36528fb452e5a150ab35687da781091d14c
2014-04-18 15:43:06 -07:00
Deepanshu Gupta
59dfbb91ca Fix build [DO NOT MERGE]
The branch is missing some CLs for 64-bit support. So, until they are
added, this change will fix the build.

Change-Id: Ia838caf60ca49b406101a3fb48a96afdcfb30c66
2014-04-17 00:14:28 -07:00
Deepanshu Gupta
492090a55e am 16191f8c: resolved conflicts for merge of 0e2049cd to klp-modular-dev
* commit '16191f8c4fe92036c8ff2eecd4e57b4642068b99':
  Layoutlib tests now check methods return value [DO NOT MERGE]
2014-04-16 19:20:01 +00:00
Deepanshu Gupta
35d46778f4 resolved conflicts for merge of ec6676dd to klp-modular-dev-plus-aosp
Change-Id: I2fec735ba65f56da7d17022074f8924a259b4bbf
2014-04-16 12:14:34 -07:00
Deepanshu Gupta
16191f8c4f resolved conflicts for merge of 0e2049cd to klp-modular-dev
Change-Id: I518e18d0c769a4cb5d325fc22165a8ead36e11de
2014-04-16 11:58:32 -07:00
Deepanshu Gupta
82d5f137ed am e5d0fce7: am 685b7d41: am 1b87390c: Overflow menu popup for Action Bar in Layoutlib [DO NOT MERGE]
* commit 'e5d0fce7aeb60c44849cd09815ccecda702422ef':
  Overflow menu popup for Action Bar in Layoutlib [DO NOT MERGE]
2014-04-16 18:43:23 +00:00
Deepanshu Gupta
ec6676ddf6 am 86384880: am f1e71876: Fix theme/style resolution in Layoutlib [DO NOT MERGE]
* commit '863848808d005fe1d2fd84a2982adfc02a3fbb9f':
  Fix theme/style resolution in Layoutlib [DO NOT MERGE]
2014-04-16 18:40:55 +00:00
Deepanshu Gupta
e5d0fce7ae am 685b7d41: am 1b87390c: Overflow menu popup for Action Bar in Layoutlib [DO NOT MERGE]
* commit '685b7d4165c417ce20b1f6c49190eabcfda09940':
  Overflow menu popup for Action Bar in Layoutlib [DO NOT MERGE]
2014-04-16 18:40:51 +00:00
Deepanshu Gupta
f2d085e867 am d023360a: am 484c88c3: am 4ccc4bd5: Action bar rendering in layoutlib [DO NOT MERGE]
* commit 'd023360aa03db1a7831a5697d49faa2575e4a9c3':
  Action bar rendering in layoutlib [DO NOT MERGE]
2014-04-16 18:39:25 +00:00
Deepanshu Gupta
110a05c6bd am 2aee0712: am e75477cb: am acf0bce0: Support custom views using TimePickerDialog [DO NOT MERGE]
* commit '2aee07124cad720587a8c51de5650b6b93ae9150':
  Support custom views using TimePickerDialog [DO NOT MERGE]
2014-04-16 18:39:21 +00:00