3791 Commits

Author SHA1 Message Date
Deepanshu Gupta
76111ecbbd am e093bbf3: am d861fd81: Set support flag for custom layouts for RecyclerView. [DO NOT MERGE]
* commit 'e093bbf3997de7d2dddc2122c1349f734478f09f':
  Set support flag for custom layouts for RecyclerView. [DO NOT MERGE]
2015-08-26 20:21:23 +00:00
Deepanshu Gupta
c5bd6146f7 am 8a50ecea: am 82fae621: LayoutLib: translucent sys ui bars [DO NOT MERGE]
* commit '8a50ecea2ea0218377f7af8b4334b4ee4d386ef7':
  LayoutLib: translucent sys ui bars [DO NOT MERGE]
2015-08-26 20:21:16 +00:00
Deepanshu Gupta
6dcfe1e2b4 am d4be80d9: am 9068539a: Update nav bar icons. [DO NOT MERGE]
* commit 'd4be80d9962cdf5d68dccd3291ed1cabb76b6df2':
  Update nav bar icons. [DO NOT MERGE]
2015-08-26 20:21:09 +00:00
Deepanshu Gupta
5eaa09ff9e am d1dde055: am e5afc311: Move the layout code out of RenderSessionImpl. [DO NOT MERGE]
* commit 'd1dde055060d63f8981ba51aeb75ab8a459db9b4':
  Move the layout code out of RenderSessionImpl. [DO NOT MERGE]
2015-08-26 20:20:58 +00:00
Deepanshu Gupta
1f2c15ca8e am 87f5fd6b: am c989950d: CalendarView rendering: use R.styleable to find attr. [DO NOT MERGE]
* commit '87f5fd6bf2c0d72fd37fb923b4d38225caa55d55':
  CalendarView rendering: use R.styleable to find attr. [DO NOT MERGE]
2015-08-26 20:20:53 +00:00
Deepanshu Gupta
36e164e095 am e3eecca9: am b2fdaca9: Add tools:openDrawer to open a DrawerLayout. [DO NOT MERGE]
* commit 'e3eecca924e7c7961c54eb37336767c995c936e7':
  Add tools:openDrawer to open a DrawerLayout. [DO NOT MERGE]
2015-08-26 20:20:45 +00:00
Deepanshu Gupta
13cd766081 am b4060700: am a14ec6f4: Change tools:list_item to listitem. [DO NOT MERGE]
* commit 'b406070040d1370b6ef6154cba3965c4ab016d66':
  Change tools:list_item to listitem. [DO NOT MERGE]
2015-08-26 20:20:35 +00:00
Deepanshu Gupta
a556d7566b am 8bfc5a9d: am b1e21330: Implement tools:list_item for RecyclerView. [DO NOT MERGE]
* commit '8bfc5a9d14000a436e54350099bd460f55418f27':
  Implement tools:list_item for RecyclerView. [DO NOT MERGE]
2015-08-26 20:20:30 +00:00
Jens Ole Lauridsen
413d41aac4 am 67b73b60: am cd4d5b3f: Support AppBar from Material Design. [DO NOT MERGE]
* commit '67b73b60bf9c9f433ed282abdc3691ee0cc6dda0':
  Support AppBar from Material Design. [DO NOT MERGE]
2015-08-26 20:20:24 +00:00
Deepanshu Gupta
7a92c26e20 am 6f5709ca: am de13095d: Update tests per new layoutlib_api [DO NOT MERGE]
* commit '6f5709ca97b27db9877c2fc65b083783d3f41e02':
  Update tests per new layoutlib_api [DO NOT MERGE]
2015-08-26 20:20:17 +00:00
Deepanshu Gupta
c5c2ea0478 am 9a13b1e7: am db67caa6: Add missing resolveResValue call. [DO NOT MERGE]
* commit '9a13b1e7502734fbe54d6f0e1c386f5382dfa662':
  Add missing resolveResValue call. [DO NOT MERGE]
2015-08-26 20:20:11 +00:00
Deepanshu Gupta
e4acf0ad4a am ad16968d: am 6eef1246: LayoutLib: Skip classes from java package. [DO NOT MERGE]
* commit 'ad16968d506840a1c1824c4ab6b5c181c8e04086':
  LayoutLib: Skip classes from java package. [DO NOT MERGE]
2015-08-26 20:20:05 +00:00
Deepanshu Gupta
7911c8b97d am 15e549a8: am 4f5e6c63: Skip warnings for some unresolved references. [DO NOT MERGE]
* commit '15e549a81f59daf016f29c6ed6f1aa3d5f65d41c':
  Skip warnings for some unresolved references. [DO NOT MERGE]
2015-08-26 20:19:58 +00:00
Deepanshu Gupta
13670bc6de am 669e4969: am 3e875dbb: Fix import order. [DO NOT MERGE]
* commit '669e4969a7245cf9d1febc5d4e67a0f2063e87fb':
  Fix import order. [DO NOT MERGE]
2015-08-26 20:19:52 +00:00
Deepanshu Gupta
6dc8bab993 am c0fd1316: am e5fa12ad: Fix ParserFactory not initialized error. [DO NOT MERGE]
* commit 'c0fd131642f21eabec570147cf9f4116c900e8a0':
  Fix ParserFactory not initialized error. [DO NOT MERGE]
2015-08-26 20:19:39 +00:00
Deepanshu Gupta
bf7907bfc8 am 6b836cd0: am a287b842: Fix NPE in BridgeContext.obtainStyledAttributes() [DO NOT MERGE]
* commit '6b836cd06b1a2ebe5d31336486bb1b54e42439df':
  Fix NPE in BridgeContext.obtainStyledAttributes() [DO NOT MERGE]
2015-08-26 20:19:32 +00:00
Deepanshu Gupta
f2bf5470a3 am 91e456d2: am e698bb27: Fix BridgeTypedArray.getType() [DO NOT MERGE]
* commit '91e456d235256c385a7da1e45f098386bc68e86a':
  Fix BridgeTypedArray.getType() [DO NOT MERGE]
2015-08-26 20:19:23 +00:00
Deepanshu Gupta
7ec7805a50 am 8a6295e8: am e481e713: Include Shapes in LayoutLib. [DO NOT MERGE]
* commit '8a6295e82a2aed91eb26fa15479bf295c2bd79d7':
  Include Shapes in LayoutLib. [DO NOT MERGE]
2015-08-26 20:19:13 +00:00
Deepanshu Gupta
594939fc07 am 66d5f24d: am ba5a02c5: LayoutLib: Support getting resource arrays. [DO NOT MERGE]
* commit '66d5f24df0c3627028812ee23da8d4f08cc83e5c':
  LayoutLib: Support getting resource arrays. [DO NOT MERGE]
2015-08-26 20:19:05 +00:00
Deepanshu Gupta
bd343c1fbf am b32e44ff: am a5ffed0b: LayoutLib: Change nullity annotations. [DO NOT MERGE]
* commit 'b32e44ff0c5fd410720bb28c87bc9cea83556edf':
  LayoutLib: Change nullity annotations. [DO NOT MERGE]
2015-08-26 20:18:54 +00:00
Deepanshu Gupta
9b1ac26921 am 1754824c: am c96ef952: Add documentation about hack in commit: f8ea750455 [DO NOT MERGE]
* commit '1754824c2835d6f3a17c4a2c0ab668991797fcf9':
  Add documentation about hack in commit: f8ea750455 [DO NOT MERGE]
2015-08-26 20:18:47 +00:00
Deepanshu Gupta
6b7f9ae6f5 am 678f0ea2: am b318ff54: Make DatePicker rendering not fail (style search fix). [DO NOT MERGE]
* commit '678f0ea2ba47f06387670e9f75b13637a6446899':
  Make DatePicker rendering not fail (style search fix). [DO NOT MERGE]
2015-08-26 20:18:34 +00:00
Deepanshu Gupta
d6363d8606 am 2e57c1e2: am cc5e69e4: Inject anonymous inner classes of injected classes [DO NOT MERGE]
* commit '2e57c1e23f43bb0ede6280720559ccc1e866024b':
  Inject anonymous inner classes of injected classes [DO NOT MERGE]
2015-08-26 20:18:27 +00:00
Deepanshu Gupta
5b886bb08f am 899daf75: am d7e89906: Update platformDir search in tests. [DO NOT MERGE]
* commit '899daf759e02bef0de14dc1a14b96b4d71f0b9fc':
  Update platformDir search in tests. [DO NOT MERGE]
2015-08-26 20:18:15 +00:00
Deepanshu Gupta
aae9c9309c am 2f50403f: am afedbc47: Make Context.getClassLoader() work. [DO NOT MERGE]
* commit '2f50403fe0a8a035757b047af00c7520fadb9015':
  Make Context.getClassLoader() work. [DO NOT MERGE]
2015-08-26 20:18:09 +00:00
Deepanshu Gupta
522e67e4ac am de3ac8f9: am 92480a9a: Fix include tag rendering. [DO NOT MERGE]
* commit 'de3ac8f9fc5987ac1f1223da02b4275fdbae3d56':
  Fix include tag rendering. [DO NOT MERGE]
2015-08-26 20:18:04 +00:00
Deepanshu Gupta
8df6131ac1 am 50e1406a: am f6b08547: Show better error message for color attr not found. [DO NOT MERGE]
* commit '50e1406a4ad668179a9a3d28c58d68c0eee44237':
  Show better error message for color attr not found. [DO NOT MERGE]
2015-08-26 20:17:51 +00:00
Deepanshu Gupta
59f026e937 am 81990c3f: am b1370c26: Fix build: udpate parser factory method [DO NOT MERGE]
* commit '81990c3f988369c755590288b93508e30024c56c':
  Fix build: udpate parser factory method [DO NOT MERGE]
2015-08-26 20:17:46 +00:00
Deepanshu Gupta
b44f7fda75 am 0a07bb95: am aa729889: Don\'t keep LayoutlibCallback reference. [DO NOT MERGE]
* commit '0a07bb95a1dd94c3457860a934d3ee546919cff2':
  Don't keep LayoutlibCallback reference. [DO NOT MERGE]
2015-08-26 20:17:40 +00:00
Deepanshu Gupta
78d77bc379 am bbbdc2ad: am 5c90c4f4: Remove kxml dependency [DO NOT MERGE]
* commit 'bbbdc2ad8939c28828a8441c0b24812c53a9eb66':
  Remove kxml dependency [DO NOT MERGE]
2015-08-26 20:17:34 +00:00
Deepanshu Gupta
4eb298a941 LayoutLib: Fix true transparency in status bar.
Change-Id: Ieedf23cde9ab3e36c77501d30cc7e808e66a4782
2015-08-26 19:42:37 +00:00
Deepanshu Gupta
a1be8b43e4 LayoutLib: Update golden test images. [DO NOT MERGE]
Also update the generated classes from the MyApplication test project.

Change-Id: I97bce3737c0cb528a61fa652988a2edb09ec885d
2015-08-25 17:12:16 -07:00
Deepanshu Gupta
c9862b4429 An ugly hack to render CalendarView. [DO NOT MERGE]
This is an ugly hack to switch the field
android.widget.SimpleMonthView.mDayFormatter from
java.text.SimpleDateFormat to icu's version of the same class. The hack
is only for the L version of the LayoutLib. It's done in a better way in
M and even better in N.

Change-Id: Id84a1d32040211c46b20cdaf3a77119676e748b6
2015-08-25 16:06:57 -07:00
Deepanshu Gupta
b1ad4a1559 LayoutLib: Fix true transparency in status bar. [DO NOT MERGE]
Change-Id: Ieedf23cde9ab3e36c77501d30cc7e808e66a4782
(cherry picked from commit f9662c006c650c9f61f19a5e1ea4a76640eb85ca)
2015-08-25 12:06:59 -07:00
Deepanshu Gupta
da687918e1 Make getInt in BridgeTypedArray accept empty String. [DO NOT MERGE]
The XML editor already warns about the empty strings in places where an
int value is required. There's no need to show another warning for it in
the rendering panel. Also, the rendering might have also failed when the
empty string is encountered. Try an continue the rendering, because no
rendering state is really bad.

Change-Id: I85106f37e4462f237e85f0b065b4ce8a4bfabf4d
(cherry picked from commit 0437cac76c24dc6cac7b530e6d80f789565550ec)
2015-08-25 12:06:58 -07:00
Deepanshu Gupta
8c674fda89 Fix layout mirroring. [DO NOT MERGE]
Change-Id: I7db398aa2d11dac1210e84922138f78f0c23bb9b
(cherry picked from commit a9090705efcc44f015486944e5aeb926173a7968)
2015-08-25 12:06:58 -07:00
Deepanshu Gupta
7aa3612940 Fix typo: s/FullScreen/Fullscreen/ in LayoutLib. [DO NOT MERGE]
Change-Id: Ia8d223ae01f08df945ab05615b07075b98a54a32
(cherry picked from commit 5a8f33f1b09b0311f1bbd1ec6b90db706edb5219)
2015-08-25 12:06:57 -07:00
Deepanshu Gupta
92f373fe32 Fix Matrix_Delegate.native_getValues() [DO NOT MERGE]
The bug manifested itself by not rendering the wifi icon in the status
bar.

Change-Id: I7debf3eef387965d774bf66e856812e67c8552a7
(cherry picked from commit 9f280a9301566c94a583cc45b6abea8a4488e33c)
2015-08-25 12:06:57 -07:00
Deepanshu Gupta
66d914018c Revert to using AppTheme for LayoutLib tests. [DO NOT MERGE]
Use AppTheme for all tests other than testExpand. AppTheme contains an
attribute needed by testArrayCheck. Also, since the AppTheme extends
Theme.Material.Light.DarkActionBar, other tests should be unaffected.

Also, update the golden image for the testArrayCheck.

Change-Id: Ib5f53f3b029c5aceef2b622e5ac63952d6b1972a
(cherry picked from commit 89a045c31f4f08bc0d9d533ef47f321e6423f656)
2015-08-25 12:06:57 -07:00
Deepanshu Gupta
6b1b651fed Fix imports. [DO NOT MERGE]
Also remove null checks on return value of ReflectionUtils.getMethod()
as the method always return non null.

Change-Id: Ib476302c2cf0504a0f54db4e795955ad10e5df3f
(cherry picked from commit 671b7f9b99316f7224c1213d6923d449a2de9b62)
2015-08-25 12:06:56 -07:00
Deepanshu Gupta
5ad4dae157 Fix theme namespace in tests. [DO NOT MERGE]
The tests used framework theme (Material), but the ResourceResolver was
created with project theme. This caused tests to fail becasue of missing
resources.

Change-Id: Ia17ee19054f6689f85e3423e83c1f47a2cc4364f
(cherry picked from commit 4a6ee98d39ab2300b2cd17c60221e43bf4ade8e7)
2015-08-25 12:06:56 -07:00
Deepanshu Gupta
723e136f96 Run setup for full tests only once. [DO NOT MERGE]
Change-Id: Iee64dbd88d473b7be08581f26ccddf649aed8e56
(cherry picked from commit a12ec8f1e28cb5a8601bf606852f1d34d7c91996)
2015-08-25 12:06:55 -07:00
Deepanshu Gupta
3ba16c1d9d LayoutLib: fix layout when nav bar is absent. [DO NOT MERGE]
Change-Id: I0d3ee6fd5a4656156a630d3b298533ea13eb8415
(cherry picked from commit 6e8d8ad2b7cffed751b2a382ac7b761954767188)
2015-08-25 12:06:55 -07:00
Deepanshu Gupta
55a363376b LayoutLib: Fix Status/Navigation Bar color. [DO NOT MERGE]
If the color value for status bar or navigation bar is declared directly
in the theme (i.e. doesn't reference a color resource via @color/foo),
the ResourceType for the attribute is not assigned by the IDE. LayoutLib
used to ignore resources that were not of type color. This change fixes
the issue by also checking the resources without a type.

Change-Id: I94735ec225415282db06ab9db5c3233ad89c052f
(cherry picked from commit e3f9834ebd8a6e4ee155c8e4c9456dfc98e8b832)
2015-08-25 12:06:54 -07:00
Deepanshu Gupta
d861fd81f7 Set support flag for custom layouts for RecyclerView. [DO NOT MERGE]
Change-Id: I3a0349c0482ae45e226b2016a0f24707c85edff4
(cherry picked from commit f7712d3524309c365b68f93497771084e6b5a66b)
2015-08-25 12:06:54 -07:00
Deepanshu Gupta
82fae62153 LayoutLib: translucent sys ui bars [DO NOT MERGE]
Change-Id: I9c294329fc78418c505a5115bc9c07da29595af2
(cherry picked from commit fc8f4aad7395eca11f6d9b82eb266b1f4ee5041b)
2015-08-25 12:06:53 -07:00
Deepanshu Gupta
9068539a48 Update nav bar icons. [DO NOT MERGE]
- Add a script to copy the icons from the original source.
- Update layout used for the navigation bar to be closer to the original
  layout.
- Update test image with the latest rendering.
- Add a nexus 5 landscape device config to help with testing.

Change-Id: I0b6674955e0970a6a8cce148b1b7aa61e1752ccd
(cherry picked from commit 139d6ff12d395a888624113fdd2521861b47d761)
2015-08-25 12:06:53 -07:00
Deepanshu Gupta
e5afc3117b Move the layout code out of RenderSessionImpl. [DO NOT MERGE]
Also, switch to using a RelativeLayout from a LinearLayout. The change
will help in future when enabling transparent status and nav bar.

Change-Id: Ie4db5d28313f1c5ef775603788598a56409f92c7
(cherry picked from commit b1484862e2367d87d3ccbd0fd0a6d2598ed5918a)
2015-08-25 12:06:52 -07:00
Deepanshu Gupta
c989950dbf CalendarView rendering: use R.styleable to find attr. [DO NOT MERGE]
Not all attr are added to R.attr. This results in some attr not being
found and hence a broken rendering. Fix the issue by adding all attr
referenced in R.styleable to the map of attr before adding any remaining
values from R.attr.

Change-Id: I1ebf8a394b9e1edbf7490e011833d20a00d38317
(cherry picked from commit e8018480dbefc896bd26e5eedfdde802ce3731a7)
2015-08-25 12:06:52 -07:00
Deepanshu Gupta
b2fdaca959 Add tools:openDrawer to open a DrawerLayout. [DO NOT MERGE]
Store a list of drawer layouts with tools:openDrawer encountered and
call openDrawer on them during the post-inflation processing.

Change-Id: Idee299a9af1bb106509a03bb2e8424c372b93dc5
(cherry picked from commit ccbc11770397888cf7780925bb4c7cf1d2f2f80e)
2015-08-25 12:06:51 -07:00