571 Commits

Author SHA1 Message Date
Deepanshu Gupta
70b2be8e0d am 59a0f746: am 51dd8878: am 60b52ee9: Fix class name for OverflowMenuButton [DO NOT MERGE]
* commit '59a0f746eb9de9086048419a5aec3dedc7ec9d94':
  Fix class name for OverflowMenuButton [DO NOT MERGE]
2014-05-13 02:00:26 +00:00
Deepanshu Gupta
0fef2d24c0 am a51ac1bd: am 503aaa48: am 7c6f6481: Add special system view cookie to OverflowButton. [DO NOT MERGE]
* commit 'a51ac1bd065904ba7102d1b1565b4a47d7cbcb4a':
  Add special system view cookie to OverflowButton. [DO NOT MERGE]
2014-05-13 02:00:23 +00:00
Deepanshu Gupta
c7a2737123 am 09a42524: am 30db282f: am 22de7c4c: Fix style warnings in RenderSessionImpl [DO NOT MERGE]
* commit '09a42524dd693a68517b9827e3d7df77c6bbf537':
  Fix style warnings in RenderSessionImpl [DO NOT MERGE]
2014-05-13 02:00:20 +00:00
Deepanshu Gupta
6f6989f353 am 80f2914b: am b67b1b45: am 094fd8ec: Add view cookies for action bar menus. [DO NOT MERGE]
* commit '80f2914b4b12340ff590882125789144d4f00ce0':
  Add view cookies for action bar menus. [DO NOT MERGE]
2014-05-13 02:00:17 +00:00
Deepanshu Gupta
6c600df673 am e686fbce: am 2c8fea2a: am 56759be8: Overflow menu popup for Action Bar in Layoutlib [DO NOT MERGE]
* commit 'e686fbced9271cc7e35f4b17c7cd1b43d118ce0f':
  Overflow menu popup for Action Bar in Layoutlib [DO NOT MERGE]
2014-05-13 02:00:14 +00:00
Deepanshu Gupta
e7c3ed4427 am 21404483: am 0bb06b91: am fe38489f: Action bar rendering in layoutlib [DO NOT MERGE]
* commit '21404483adbd4f26b5a2c7ebee7c09e83f42607e':
  Action bar rendering in layoutlib [DO NOT MERGE]
2014-05-13 02:00:11 +00:00
Deepanshu Gupta
c88d4c572f am b172b780: am f3264738: am cc5340bc: Add missing dependency in layoutlib build file [DO NOT MERGE]
* commit 'b172b7805160d4a6875d694cb218fe05b117beb3':
  Add missing dependency in layoutlib build file [DO NOT MERGE]
2014-05-13 02:00:08 +00:00
Deepanshu Gupta
57c0cf454a am 71acfa6c: am 49d47a02: am 76dccb7f: Fix theme/style resolution in Layoutlib [DO NOT MERGE]
* commit '71acfa6c1933806a080fc6efb820833f8de68d54':
  Fix theme/style resolution in Layoutlib [DO NOT MERGE]
2014-05-13 02:00:06 +00:00
Deepanshu Gupta
3195ff0afa am b90db3e6: am de3b2c06: am 1ed75bde: Remove references to non-std Java classes. [DO NOT MERGE]
* commit 'b90db3e6ab1bc89752ce8d7bd286268c41843693':
  Remove references to non-std Java classes. [DO NOT MERGE]
2014-05-13 02:00:03 +00:00
Deepanshu Gupta
4654bfc14c am c2a6f3b1: am 2f94c1db: am 6136af32: Fix visitFieldInsn in layoutlib_create. [DO NOT MERGE]
* commit 'c2a6f3b1eda89365eec2508aec4a3a5024c140e5':
  Fix visitFieldInsn in layoutlib_create. [DO NOT MERGE]
2014-05-13 01:59:58 +00:00
Deepanshu Gupta
863b49ccaa am 9b89fcc0: am ef9596a1: am 2bd65db1: Layoutlib tests now check methods return value [DO NOT MERGE]
* commit '9b89fcc09d0e5da7b81f1910d6ed29b152f730f9':
  Layoutlib tests now check methods return value [DO NOT MERGE]
2014-05-13 01:59:55 +00:00
Deepanshu Gupta
60b52ee929 Fix class name for OverflowMenuButton [DO NOT MERGE]
Change-Id: Ie3e709e7aadb2193397df8befef0c55624d7e4e3
(cherry picked from commit f61bd0020642cf0868486d307f2e68c8c02d6102)
2014-05-04 13:30:33 -07:00
Deepanshu Gupta
7c6f6481f4 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 d558ebdb433af498a87e25673f7dd828a0e7439a)
2014-05-04 13:30:11 -07:00
Deepanshu Gupta
22de7c4c3d Fix style warnings in RenderSessionImpl [DO NOT MERGE]
Change-Id: I9d3cb23e4ea692f737a3e3d6c18cc8de18b66a3c
(cherry-picked from commit a98121ef5251b5ebdb8c1b0b6780d570844284b2)
2014-05-04 13:29:51 -07:00
Deepanshu Gupta
094fd8ecb6 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 7704837947455909f295b088a3d15a20e107dbd7)
2014-05-04 13:29:14 -07:00
Deepanshu Gupta
56759be896 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-05-02 16:23:14 -07:00
Deepanshu Gupta
fe38489f67 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 20e0695b554e883b095f5223be10b6e1097db49f)
2014-05-02 16:23:14 -07:00
Deepanshu Gupta
cc5340bc63 Add missing dependency in layoutlib build file [DO NOT MERGE]
Add missing dependency on built_ext_data

Change-Id: I4e7cca7f6cbc7f5b7416ac9b85a9aec01e61ecd4
(cherry-picked from commit b85d30a2c88b6a23e251347b14a75456c4daeca9)
2014-05-02 16:23:14 -07:00
Deepanshu Gupta
76dccb7f43 Fix theme/style resolution in Layoutlib [DO NOT MERGE]
Change-Id: Icfb91e566666408802dadc0e2070991151b16b9d
(cherry picked from commit 3c00b28bf60ab01b449e16df045238f4bae4d700)
2014-05-02 16:23:13 -07:00
Deepanshu Gupta
1ed75bde09 Remove references to non-std Java classes. [DO NOT MERGE]
This change adds a substitute for the Charsets class in java namespace.
The original cherry pick of the change had dropped this substitute. But
the substitute is required for bug b.android.com/59732

The original cherry-pick is 6335590aa8997944cc7fb358a315dbb9b789f87f and
the original change is 81f74f4bc96ea4266cebe1b785d095558f540800
The original Change-Id is Iac5b272652e2780c9bb72d19f415d150948ca589

Change-Id: I76c87c74ee088778b37d1a7a7d531e0fde5c758f
2014-05-02 16:22:14 -07:00
Deepanshu Gupta
6136af326e 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-05-02 15:38:42 -07:00
Deepanshu Gupta
2bd65db15f 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 89fdc0c556cf0fe2562fb8f0476e03cd51045164)
2014-05-02 14:19:47 -07:00
Deepanshu Gupta
495c14d8b8 am 47ad22ed: am 961e3281: am 6df2860b: Add missing files to fix libphonenumber for layoutlib. [DO NOT MERGE]
* commit '47ad22edb7df502356598d417adbce0b0ce35616':
  Add missing files to fix libphonenumber for layoutlib. [DO NOT MERGE]
2014-05-02 19:31:59 +00:00
Deepanshu Gupta
8ad4b8b1fe am 9932e589: am 9e2dadae: am bcbeaf83: Set default text style in layoutlib as NORMAL [DO NOT MERGE]
* commit '9932e589b0f604b1c553e043cd6a60adbc1b7055':
  Set default text style in layoutlib as NORMAL [DO NOT MERGE]
2014-05-02 19:31:56 +00:00
Deepanshu Gupta
826a215c8b am 320f1126: am cf3f108e: am 5be65fda: Fix sans-serif-thin and sans-serif-light fonts in layoutlib. [DO NOT MERGE]
* commit '320f1126a35fae6e5c2f72f75db5b38bdb207a76':
  Fix sans-serif-thin and sans-serif-light fonts in layoutlib. [DO NOT MERGE]
2014-05-02 19:31:53 +00:00
Deepanshu Gupta
0a37981cad am 1b28d8d4: am d642de58: am ec4623d0: Improve text rendering and measurement. [DO NOT MERGE]
* commit '1b28d8d4a0b4193b23ed4647a18c4242beb74038':
  Improve text rendering and measurement. [DO NOT MERGE]
2014-05-02 19:31:50 +00:00
Deepanshu Gupta
f4b35c6a83 am ef822b3f: am 62a4a1f9: am 2a82a48f: Fix the measurement of text bounds. [DO NOT MERGE]
* commit 'ef822b3f13204d084196c1124d22a153868b017f':
  Fix the measurement of text bounds. [DO NOT MERGE]
2014-05-02 19:31:48 +00:00
Deepanshu Gupta
e0537c1d49 am c7f8e64c: am 1830a58f: am 5bb3414d: Fix a bug in Nine Patch library. [DO NOT MERGE]
* commit 'c7f8e64cb9b6ff81b2188a31c3d804b763c63fe8':
  Fix a bug in Nine Patch library. [DO NOT MERGE]
2014-05-02 19:31:44 +00:00
Deepanshu Gupta
5e6a299080 am 4d887ec3: am bcd50a7c: am 5712b5fc: Optimize layout rendering in layoutlib [DO NOT MERGE]
* commit '4d887ec388da13c6b65455416a0b829d81e0160a':
  Optimize layout rendering in layoutlib [DO NOT MERGE]
2014-05-02 19:31:42 +00:00
Deepanshu Gupta
73f9e4675c am edd67cb1: am 7c02c6e2: am 02cde9ce: Add methods for Time_Delegate [DO NOT MERGE]
* commit 'edd67cb194b54bb7c6c25eb570d28614900446cf':
  Add methods for Time_Delegate [DO NOT MERGE]
2014-05-02 19:31:39 +00:00
Deepanshu Gupta
95fd97aa82 am 84e7a6b8: am 443372dd: am 9d7b5165: Add libphonenumber to layoutlib.jar. [DO NOT MERGE]
* commit '84e7a6b82303b52c7b44f1a2a295177361edf9ea':
  Add libphonenumber to layoutlib.jar. [DO NOT MERGE]
2014-05-02 19:31:36 +00:00
Deepanshu Gupta
88a12f5744 am 43034b54: am 62591cff: am 689c0dfe: Fix NPE in layoutlib. [DO NOT MERGE]
* commit '43034b541cecd924b4b79a5caff850a53516ec26':
  Fix NPE in layoutlib. [DO NOT MERGE]
2014-05-02 19:31:18 +00:00
Deepanshu Gupta
43ed35da99 am ce205d0a: am 600539c7: am 083d1562: Fix text size in Fake Action Bar. [DO NOT MERGE]
* commit 'ce205d0a3b88e12127a8c717ff913fce2d59e36d':
  Fix text size in Fake Action Bar. [DO NOT MERGE]
2014-05-02 19:31:15 +00:00
Deepanshu Gupta
aab9d9a75c am 1a434aa8: am 697c511d: am 80c668f2: Remove references to non-std Java classes. [DO NOT MERGE]
* commit '1a434aa8fcc118df13bea58e112da081d47ae73b':
  Remove references to non-std Java classes. [DO NOT MERGE]
2014-05-02 19:31:11 +00:00
Deepanshu Gupta
d15bbac631 am a2b530fb: am e39de9ae: am 6335590a: Fix DatePicker and Calendar widget in layoutlib. [DO NOT MERGE]
* commit 'a2b530fb7a11e5d0490daf5e9fea56ead5181caa':
  Fix DatePicker and Calendar widget in layoutlib. [DO NOT MERGE]
2014-05-02 19:31:08 +00:00
Deepanshu Gupta
3e9bc26210 am 9d209905: am 6f469e54: am 11ee746d: Layoutlib: Update the wifi icon in the status bar. [DO NOT MERGE]
* commit '9d2099052d207a4ca3bf3e4ef021feadf20c260f':
  Layoutlib: Update the wifi icon in the status bar. [DO NOT MERGE]
2014-05-02 19:31:05 +00:00
Deepanshu Gupta
2bb672a208 am 582bb0dc: am fbb1561a: am 44bcd64e: Fix CalendarView to show the right labels. [DO NOT MERGE]
* commit '582bb0dc7498997f441c5209b1558a4640b5a107':
  Fix CalendarView to show the right labels. [DO NOT MERGE]
2014-05-02 19:19:55 +00:00
Deepanshu Gupta
27f0cf0b13 am 10fd7f6b: am ca2c6307: am 87be67f9: Fix layoutlib [DO NOT MERGE]
* commit '10fd7f6b4192fdbd847106fb0d9ec87095092ee3':
  Fix layoutlib [DO NOT MERGE]
2014-05-02 19:19:52 +00:00
Deepanshu Gupta
5c7a844ca1 am 23726255: am 77d1eca7: am 7b5d54f0: Fix ClassCastException when rendering ListView [DO NOT MERGE]
* commit '237262558b818ce52ec53281f2270be3e4f1ee28':
  Fix ClassCastException when rendering ListView [DO NOT MERGE]
2014-05-02 19:19:48 +00:00
Deepanshu Gupta
d60d0c1ce7 am f5512973: am fe675441: am ce22440d: Fix text rendering [DO NOT MERGE]
* commit 'f55129731005f6939d40d7c8a0c0f8c93b472f98':
  Fix text rendering [DO NOT MERGE]
2014-05-02 19:19:46 +00:00
Deepanshu Gupta
44cc867f7d am 9a1f13a4: am afc623e3: am bd9e181b: Fix layout rendering for RTL locales [DO NOT MERGE]
* commit '9a1f13a47bfe29e344efc05f0ecabbfcb5671e06':
  Fix layout rendering for RTL locales [DO NOT MERGE]
2014-05-02 19:19:42 +00:00
Deepanshu Gupta
1197605876 am b80247d3: am 811b331a: am d4875e19: Add orientation to configuration for layoutlib. [DO NOT MERGE]
* commit 'b80247d351b88f69192260a661dbf3d4d71e9527':
  Add orientation to configuration for layoutlib. [DO NOT MERGE]
2014-05-02 19:19:39 +00:00
Deepanshu Gupta
e821d0cc54 am b27d8814: am 21cf9843: am d1084cc0: Add missing native methods. [DO NOT MERGE]
* commit 'b27d881467869539a5c8ec2510e8415912abb617':
  Add missing native methods. [DO NOT MERGE]
2014-05-02 19:19:36 +00:00
Deepanshu Gupta
6df2860b23 Add missing files to fix libphonenumber for layoutlib. [DO NOT MERGE]
Change-Id: I8102da6c1c4625e887293a8823770d199521c53f
(cherry-picked from 8a16f8e29a67c383e065ba9c47d5d1e80d7d2db9)
2014-05-02 12:03:46 -07:00
Deepanshu Gupta
bcbeaf83ca 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 c63e87d53deb24c4286036313db11719173419b3)
2014-05-02 11:46:42 -07:00
Deepanshu Gupta
5be65fda15 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 5fb41528a6192c41f7e2bb30161cc5af6061d5b8)
2014-05-02 11:46:42 -07:00
Deepanshu Gupta
ec4623d0d4 Improve text rendering and measurement. [DO NOT MERGE]
1. Fix a bug where baseline of the run was modified while rendering
resulting in crooked text in some cases.

2. Use GlyphVector.getLogicalBounds() for text measurement which is more
accurate than getVisualBounds().

3. This change also optimizes text rendering by not computing the advances
for individual glyphs when not needed.

Change-Id: I66792c4d8f50eaf29afa70bccca1e6c812a3fa28
(cherry-picked from 88301948c92fe1261cfa19383d4aaa5d5d0195ac)
2014-05-02 11:46:42 -07:00
Deepanshu Gupta
2a82a48fef Fix the measurement of text bounds. [DO NOT MERGE]
Bug: 12366230
Change-Id: I203b678363dc7b688c744503ee10216baca658a9
(cherry-picked from eb1fae940df0117deb0dc891f9f9bfeca35b1ac1)
2014-05-02 11:46:41 -07:00
Deepanshu Gupta
5bb3414d14 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 ee1187a94feb61adbfade2505b2f92418a1b1038)
2014-05-02 11:46:41 -07:00
Deepanshu Gupta
5712b5fc3f 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 9e5e993c7969ad60ff70cfdcf707247f38a705a1)
2014-05-02 11:46:41 -07:00