3789 Commits

Author SHA1 Message Date
Deepanshu Gupta
35f7562495 Merge "Revert "Revert "Update StaticLayout_Delegate to use new nLoadHyphenator""" into mnc-ub-dev 2015-11-19 20:49:55 +00:00
Deepanshu Gupta
66098964e2 Revert "Revert "Update StaticLayout_Delegate to use new nLoadHyphenator""
This reverts commit 65a834980cdbb9407a3f27e48cd0a8c472182cd6.


The original revert was only for cherry-pick to release
branch.

Change-Id: Ib78f9a06ce49681c767f65b262058f18a670e38e
2015-11-19 20:49:35 +00:00
Deepanshu Gupta
8c971ae5a0 Merge "Revert "Update StaticLayout_Delegate to use new nLoadHyphenator"" into mnc-ub-dev 2015-11-19 20:48:52 +00:00
Deepanshu Gupta
65a834980c Revert "Update StaticLayout_Delegate to use new nLoadHyphenator"
This reverts commit 631c2ffd6ff1bfa7463d29a39a7ee74be019b3f9.

The revert is only for cherry-pick back to mnc-sdk-release.

Change-Id: I42cb392528b7890b58d689c732f90c3b9ba5f74c
2015-11-19 20:47:26 +00:00
Diego Perez
603544d4c4 Merge "Fix delegation of methods within inner static classes" into mnc-ub-dev 2015-11-17 22:34:08 +00:00
Deepanshu Gupta
4ea74d2960 Revert "LayoutLib: Fix true transparency in status bar."
This reverts commit 4eb298a941c3f465944b63f1a06518e911681c89.

Even though this is techinically closer to what the framework does, the
fix is not complete. As a result, it looks worse when using AppCompat
themes. Revert the change for the release.

Change-Id: I67c1002ea17dee7234d78e2d13aab876467bd70f
2015-11-17 12:25:25 -08:00
Deepanshu Gupta
42a893b50b Merge "AppCompatActionBar: use findClass to test presence" into mnc-ub-dev 2015-11-17 20:22:43 +00:00
Deepanshu Gupta
22931224d9 LayoutLib: IntelliJ changed project files.
Change-Id: I1f99ab678067c26ba2e9938c9dce40c99a6725c3
2015-11-17 11:37:35 -08:00
Deepanshu Gupta
99b54b364b AppCompatActionBar: use findClass to test presence
To test the presence of WindowDecorActionBar class, use findClass()
instead of loadClass() which logs warnings.

Change-Id: Ice8a5a6badd764c7f75b5a64a07c48f0a7cfef98
2015-11-17 11:34:32 -08:00
Deepanshu Gupta
2b0551175d WindowDecorActionBar name change fix.
In change id I7582e242c7564c32feeb044fc9eff6bfb5c56536,
WindowDecorActionBar's package name was changed. This breaks layoutlib.
Fix the issue by checking both package names when loading the class.

Change-Id: I5723a97f0f164d61c56061fef6cff18e3cdafaee
2015-11-16 15:46:12 -08:00
Diego Perez
6777f54fa4 Fix delegation of methods within inner static classes
Currently, delegation of inner static classes methods is broken since
the rewritten method tries to pass an instance to the outer class. This
updates the method generation to only pass the reference if the inner
class is not static.

Change-Id: I8493929cafdbd80968989b422af0f956fa65681a
2015-11-13 14:06:50 +00:00
Deepanshu Gupta
d30c141a2d Improve error reporting on Exceptions in fw views.
When there's an exception during the inflation of a framework view (for
example invalid attributes), report the exception correctly. The earlier
behaviour assumed the exception to be a ClassNotFoundException and tried
to load it from the user's project. This is not longer the case.

Also, update the MockView class to a FrameLayout with a single TextView.
This means that the MockView is a ViewGroup and will not choke when
someone attempts to add a View to it (although, the view will be
silently dropped).

Change-Id: Ice003817ceb627ebfbbbb245ab6be10f9141e728
2015-11-12 13:56:14 -08:00
Deepanshu Gupta
c9b8f95c99 Fix Switch colors
The conversion of the PorterDuff mode from int to enum was incorrect
resulting in the wrong PorterDuff Mode being used.

Change-Id: I7607d505b6e4382e6101869971154f6a77db279c
2015-11-05 09:20:07 -08:00
Diego Perez
1c442aca0a Merge "Remove auto-boxing during the inflate" into mnc-ub-dev 2015-11-04 14:26:15 +00:00
Diego Perez
631c2ffd6f Update StaticLayout_Delegate to use new nLoadHyphenator
Small fix to update call parameters

Change-Id: I4322aa212493ec2970ae17ec1918b9b7e2f8e93a
2015-11-04 11:35:34 +00:00
Diego Perez
91fa3ba4cc Remove auto-boxing during the inflate
Change-Id: I3f9ba5d78363f878fa0c58ca8cbf736bd43fe1c0
2015-11-03 14:59:23 +00:00
Deepanshu Gupta
2f01cf2ea6 LayoutLib: Fix android:dependency for preferences.
Bug: http://b.android.com/189314
Change-Id: I229632d11a2529e865f3f2e8eca3a78b47ad462c
2015-10-09 14:54:19 -07:00
Deepanshu Gupta
9969f858c3 LayoutLib: Fix ring rendering.
Bug: http://b.android.com/65503
Change-Id: I6ed901703cffee345f3083ea3ddeb52a28f4ac64
2015-10-07 12:46:15 -07:00
Deepanshu Gupta
8db8bc6362 Merge "Skip drawing empty shapes to keep Apple JRE happy." into mnc-ub-dev 2015-10-07 17:08:30 +00:00
Deepanshu Gupta
4064e118e2 Skip drawing empty shapes to keep Apple JRE happy.
Bug: http://b.android.com/178278
Change-Id: I693912678ed79e9c6690560b618a605da5a807c6
2015-10-07 09:28:31 -07:00
Diego Perez
081cebf52b Implement Path.approximate and add PathMeasure support
PathMeasure is needed to use the trimPath* properties in drawables.
These properties are used in the vector drawable for indeterminate
progress bars in Material so this is needed to be able to render them
correctly in the preview.
PathMeasure makes use of Path.approximate to calculate which segments to
paint.

Change-Id: Ic513f0a30a6aac0317f7c13cd75e9154c37405c8
2015-10-07 17:04:26 +01:00
Deepanshu Gupta
e5d3baf22f LayoutLib: Fix bitmap scaling.
Bug: http://b.android.com/187939
Change-Id: I20bf61746e8af3bb87ba9cfcc9bf58854ac7c5be
2015-10-05 16:08:54 -07:00
Deepanshu Gupta
7a9f771fe0 Merge "Don't break error string (easier grepping)" into mnc-ub-dev 2015-09-30 22:16:22 +00:00
Deepanshu Gupta
1bd276f6f7 Don't break error string (easier grepping)
Change-Id: If52097ba90481644707dd0323ec63ca3ddf0986b
2015-09-30 12:49:42 -07:00
Diego Perez
b9c4cccf67 Merge "Reduce the amount of allocations on Paint_Delegate" into mnc-ub-dev 2015-09-30 09:29:40 +00:00
Diego Perez
6dac0d4b7c Reduce the amount of allocations on Paint_Delegate
When the text properties of the Paint object are updated, or when .set()
is called, updateFontObject will be called. This method is currently at the
top of the methods for number of allocations.
This CL reduces the number of calls to updateFontObject by a 90%,
reducing the number of Font allocations.

Change-Id: I3e232f9e6e230da8ecdd19921faadf2d3f4ff763
2015-09-30 09:10:37 +01:00
Deepanshu Gupta
4e27221d49 Merge "Support databinding in listitem layouts." into mnc-ub-dev 2015-09-30 00:45:52 +00:00
Deepanshu Gupta
e91096c03d Support databinding in listitem layouts.
Add a wrapper around the PullParser to support stripping out databinding
parts.

Bug: http://b.android.com/187428
Change-Id: I88080d8f4108cb5ae27a137ad20c5dd7d516f3ea
2015-09-29 17:07:53 -07:00
Deepanshu Gupta
6649ca3711 Fix TypedArray.getTextArray()
Change-Id: Ic55b52840892fbf2a4258ba97ed31ca0283da8ed
2015-09-23 16:03:02 -07:00
Diego Perez
0e766de7c5 Avoid calling scrollBy(0,0) on render
Usually scrollBy(0, 0) won't have any effect but when called on the
NumberPicker but, in some cases, it seems to cause an endless loop.
When called from layoutlib, this will hold the read lock causing all
operations trying to acquire the write lock to block forever.

Bug: http://b.android.com/182506
Change-Id: Ib25427d3f32d804d1c481d979795eee71fbdbc6d
2015-09-22 16:44:37 +00:00
Deepanshu Gupta
ee1eed7e71 am 7209945f: am 0e150a8b: am 0c5fd7e3: am eb541727: am dd21212f: am eb26f5ce: LayoutLib: Fix typedArray caching.
* commit '7209945fd38d22078b2fd208abe0aa976c311dde':
  LayoutLib: Fix typedArray caching.
2015-09-02 01:21:26 +00:00
Deepanshu Gupta
0c5fd7e379 am eb541727: am dd21212f: am eb26f5ce: LayoutLib: Fix typedArray caching.
* commit 'eb54172719db60740a0b8dde6380db54d4006159':
  LayoutLib: Fix typedArray caching.
2015-09-02 00:11:24 +00:00
Deepanshu Gupta
eb54172719 am dd21212f: am eb26f5ce: LayoutLib: Fix typedArray caching.
* commit 'dd21212fa1a9c907d5d2f80f3de2413f6c14da7a':
  LayoutLib: Fix typedArray caching.
2015-09-01 23:59:10 +00:00
Deepanshu Gupta
eb26f5cecd LayoutLib: Fix typedArray caching.
The typedArray depends on the current context (more specifically, the
themes set on the context). The fact was ignored in the caching of the
typedArray and caused the android:theme attribute to be ignored in
certain cases.

Change-Id: If095580919474f12c0eb4e1f8fb7f076cf3c4ed0
2015-09-01 23:17:56 +00:00
Deepanshu Gupta
753517700d Fix android:theme parsing for custom views.
Change-Id: Iba83ba1d2e4a96461cc298a759e32e4e51e311a0
2015-08-28 14:49:04 -07:00
Deepanshu Gupta
ebdedb47e5 am 42994097: am a1be8b43: LayoutLib: Update golden test images. [DO NOT MERGE]
* commit '4299409775ffd5cb70a8970c15807f33fc8b08d4':
  LayoutLib: Update golden test images. [DO NOT MERGE]
2015-08-26 20:22:48 +00:00
Deepanshu Gupta
68ff174b09 am 2b99b5da: am c9862b44: An ugly hack to render CalendarView. [DO NOT MERGE]
* commit '2b99b5da279a7cbf1f6412a8ac7d6bfdd82e26c6':
  An ugly hack to render CalendarView. [DO NOT MERGE]
2015-08-26 20:22:43 +00:00
Deepanshu Gupta
d9600c986d am 7eb81868: am b1ad4a15: LayoutLib: Fix true transparency in status bar. [DO NOT MERGE]
* commit '7eb81868c338fc78139592ac81845c080f53b1c5':
  LayoutLib: Fix true transparency in status bar. [DO NOT MERGE]
2015-08-26 20:22:35 +00:00
Deepanshu Gupta
5769732e6e am 9d6e87b6: am da687918: Make getInt in BridgeTypedArray accept empty String. [DO NOT MERGE]
* commit '9d6e87b67eb0d39d7584b12a3e843db68c8c9f3b':
  Make getInt in BridgeTypedArray accept empty String. [DO NOT MERGE]
2015-08-26 20:22:29 +00:00
Deepanshu Gupta
728fc73130 am c43506fc: am 8c674fda: Fix layout mirroring. [DO NOT MERGE]
* commit 'c43506fc2dbe3fea6885e74ac8c67b91a0a644ff':
  Fix layout mirroring. [DO NOT MERGE]
2015-08-26 20:22:23 +00:00
Deepanshu Gupta
37ae8f4ef8 am 918e62f1: am 7aa36129: Fix typo: s/FullScreen/Fullscreen/ in LayoutLib. [DO NOT MERGE]
* commit '918e62f1cb7e5802cfb7435dd606380fa5d3a278':
  Fix typo: s/FullScreen/Fullscreen/ in LayoutLib. [DO NOT MERGE]
2015-08-26 20:22:17 +00:00
Deepanshu Gupta
e4b4b08446 am eb15670c: am 92f373fe: Fix Matrix_Delegate.native_getValues() [DO NOT MERGE]
* commit 'eb15670ccc46c688537cd99fa1af2e475a5fd2be':
  Fix Matrix_Delegate.native_getValues() [DO NOT MERGE]
2015-08-26 20:22:11 +00:00
Deepanshu Gupta
05ed2d9148 am 42e53ecb: am 66d91401: Revert to using AppTheme for LayoutLib tests. [DO NOT MERGE]
* commit '42e53ecbc146c4b131961e1f1764fcf886204b07':
  Revert to using AppTheme for LayoutLib tests. [DO NOT MERGE]
2015-08-26 20:22:05 +00:00
Deepanshu Gupta
21f66a6b9f am 5078ad32: am 6b1b651f: Fix imports. [DO NOT MERGE]
* commit '5078ad325b0da36fe798df1df428d12732548217':
  Fix imports. [DO NOT MERGE]
2015-08-26 20:21:55 +00:00
Deepanshu Gupta
34f6f59790 am 4a213763: am 5ad4dae1: Fix theme namespace in tests. [DO NOT MERGE]
* commit '4a2137639aba761dcf289f1e2cc2e48dd42e7a3f':
  Fix theme namespace in tests. [DO NOT MERGE]
2015-08-26 20:21:49 +00:00
Deepanshu Gupta
39b4f4cc75 am f988761c: am 723e136f: Run setup for full tests only once. [DO NOT MERGE]
* commit 'f988761c0acc02bb4b21b6357e418da7799f11e7':
  Run setup for full tests only once. [DO NOT MERGE]
2015-08-26 20:21:43 +00:00
Deepanshu Gupta
de8da2793d am e54dbc4a: am 3ba16c1d: LayoutLib: fix layout when nav bar is absent. [DO NOT MERGE]
* commit 'e54dbc4ac74d110c4121932a22d04447a0e15b65':
  LayoutLib: fix layout when nav bar is absent. [DO NOT MERGE]
2015-08-26 20:21:38 +00:00
Deepanshu Gupta
963cac18ad am 147c0506: am 55a36337: LayoutLib: Fix Status/Navigation Bar color. [DO NOT MERGE]
* commit '147c0506d5425633f0d45e1489262d4e27a35921':
  LayoutLib: Fix Status/Navigation Bar color. [DO NOT MERGE]
2015-08-26 20:21:29 +00:00
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