71b8fa8301051c0678fbaa79edd7ba884047df4f |
|
05-Jan-2018 |
Jerome Gaillard <jgaillard@google.com> |
Update BridgeTypedArray following platform commit 5dc45ca Change I13f7080f introduces a new check for whether the text in a TextView is set from the xml attribute or through a resource, by trying to find the associated resourceId. When set from xml, no id is found, which is the correct behaviour. So in that case, layoutlib should not log a warning. Test: layoutlib tests Change-Id: Ifa7dc09ab3d7ea391711fd7fa96da6c6b83306b5
/frameworks/layoutlib/bridge/src/android/content/res/BridgeTypedArray.java
|
5fe96f847cc6b35510cd6e97777c8b8b75d94671 |
|
17-Jul-2017 |
Diego Perez <diegoperez@google.com> |
getColorStateList should apply theme overlays Bug: 37324292 Test: Added new test for state lists and overlays Change-Id: I280a8b31d641ce4d14f4cc3095e8d954d72b1dd6
/frameworks/layoutlib/bridge/src/android/content/res/BridgeTypedArray.java
|
ef221c3b4f85123ac1ba21b46e36545c91508eda |
|
20-Jun-2017 |
Diego Perez <diegoperez@google.com> |
Do not try to resolve system font values Bug: 62815913 Test: N/A. Only testable with the support lib Change-Id: I91b130ebbef3a47b6070934d37ffa188b579c0c5
/frameworks/layoutlib/bridge/src/android/content/res/BridgeTypedArray.java
|
bc876628ee6b96164b91908ff62fcaefe930f403 |
|
18-May-2017 |
Charlie Tsai <chartsai@google.com> |
Support reference type for BridgeTypedArray.getValue() Test: N/A (indirectly tested by rendering tests) Change-Id: I7f90b080afe10f41ce695276f37dc8e298132dcd
/frameworks/layoutlib/bridge/src/android/content/res/BridgeTypedArray.java
|
41599e719d17f7a7fb64e2df043eb3542f4325f5 |
|
02-May-2017 |
Diego Perez <diegoperez@google.com> |
Sync layoutlib projects with latest changes in master Test: N/A Change-Id: I0a9cf653d1b17a5206a31516443cc7d8606a5b6e
/frameworks/layoutlib/bridge/src/android/content/res/BridgeTypedArray.java
|
3dd065e62224ca70a8415ebe8764b626f86a9397 |
|
29-Mar-2017 |
Charlie Tsai <chartsai@google.com> |
Fixed Intent parsing error of PreferenceScreen When PreferenceScreen contains the Intent tag with the extra tag, the parsing of xml file is failed and causes the render problem on Layout editor. Test: N/A Bug: http://b.android.com/233302 Change-Id: I987de7aa125299d46fc1b7670f07f3dd4427ee21
/frameworks/layoutlib/bridge/src/android/content/res/BridgeTypedArray.java
|
0609785e6f839bfd27e33fa2630e6a1c12be9a20 |
|
29-Mar-2017 |
Diego Perez <diegoperez@google.com> |
Make layoutlib more lenient with recoverable errors In many cases, throwing an exception will stop the inflation or rendering of a layout. Sometimes, we could recover from some of the failures and render a layout that is "usable". I've done a first pass trying to follow the following rules: - Try simple recoveries by choosing sensible defaults. Not trying complex recoveries. - Only recover if the exception is not part of the class behaviour. Avoided removing declared exceptions or exceptions that are expected by the framework. - I've kept assertions in place so, in most cases, the behaviour will be almost identical to the previous one with assertions enabled. Test: Checked with existing tests Change-Id: I0001fdd3c808cf405c4eb8d734b9bbe63493e05c
/frameworks/layoutlib/bridge/src/android/content/res/BridgeTypedArray.java
|
e76383f79ff4e9103857c94a1fc16afb34587540 |
|
21-Nov-2016 |
Diego Perez <diegoperez@google.com> |
Add support for aapt:attr attributes Test: Tested from the studio side Change-Id: Id506801f53cfc976c7352bd7f9632804862668b7
/frameworks/layoutlib/bridge/src/android/content/res/BridgeTypedArray.java
|
7c22a707de1ed939ebd91079dff9df6cd5ffd401 |
|
13-Feb-2017 |
Diego Perez <diegoperez@google.com> |
Add dynamic font support This CL allows loading fonts from resources. Test: Added new fonts test Change-Id: Ic82239121cc3f78f2a22b22de42e54575c1f2d98
/frameworks/layoutlib/bridge/src/android/content/res/BridgeTypedArray.java
|
a73a0143fefc62be1ef270db0363272cb4e1864d |
|
23-Nov-2016 |
John Reck <jreck@google.com> |
Clean up ApplyStyle JNI Bug: 32573798 Mark input uint32_t[] as const. Use Read-only JNI array access for input as it's faster than critical access. Use non-movable arrays for TypedArray so that the address can be resolved and stored, avoiding the need to do JNI array access for the output. Indicies is always non-null, so remove the optional checks. Eliminate unused return value. Benchmark results: twelveKeyInflate 4963us -> 4713us simpleViewInflate 73us -> 60us Test: Device boots, benchmarks show faster Change-Id: Ic3bde5aee31407d8903913f97f2218daf074499a
/frameworks/layoutlib/bridge/src/android/content/res/BridgeTypedArray.java
|
21bf7d189aea4c63a03716a4e82f4193f099e7ee |
|
29-Jul-2016 |
Diego Perez <diegoperez@google.com> |
Try to resolve IDs also as enums This is intended to cover the edge case in ConstraintLayout (and possibly in other places) where an attribute is defined as reference|enum. If we can not resolve the value as a reference, try to resolve it as an enum and return the value. Change-Id: I2817aa5d78500247a2e9aec5411586a1db13791d (cherry picked from commit b24b563654bf7c007f0912bf32fbab948fcb6daa)
/frameworks/layoutlib/bridge/src/android/content/res/BridgeTypedArray.java
|
9b30e13d8a9896da848fb5db5f91c802fc5249b2 |
|
27-May-2016 |
Diego Perez <diegoperez@google.com> |
Add support for AppCompat widgets This allows previews to use appcompat attributes like app:backgroundTint. Bug: http://b.android.com/211349 Change-Id: Iaa5f1612c58a6a27d3948bfe1bc0373098c57720 (cherry picked from commit 2ddddbc86314fa16c51d0e5f0d6e55e0a6676d26)
/frameworks/layoutlib/bridge/src/android/content/res/BridgeTypedArray.java
|
458012138a86c2f07cf12adc90af0c4e1b8d678f |
|
07-Mar-2016 |
Xavier Ducrohet <xav@google.com> |
Merge "Change BridgeResources to Resources_Delegate" into nyc-dev
|
741ef6aac95e239f894f5640b8ff9728655e98b7 |
|
01-Mar-2016 |
Diego Perez <diegoperez@google.com> |
Add support for GradientColor in layoutlib Change-Id: Ia9a55a9e00d7ddb5263f3dbe46b5da8dde457526
/frameworks/layoutlib/bridge/src/android/content/res/BridgeTypedArray.java
|
896eb1c37f6a44d65d3a459891475e99170b657c |
|
04-Mar-2016 |
Deepanshu Gupta <deepanshu@google.com> |
Change BridgeResources to Resources_Delegate This is a very hacky fix to make layoutlib work with the latest support lib. Inject a couple of fields in android.content.res.Resources to allow using most of the earlier code as is. Bug: 27403642 Bug: http://b.android.com/201934 Change-Id: Ia96a1b4642a1907a77d9ca7a2392f78809b92e38
/frameworks/layoutlib/bridge/src/android/content/res/BridgeTypedArray.java
|
e4cf18face6980b0c7ac42761512cd93b89927c3 |
|
23-Feb-2016 |
Diego Perez <diegoperez@google.com> |
Implement native methods in VectorDrawable Most of the VectorDrawable implementation has been moved to native code. This CL implements most of the required functionality that existed in Marshmallow. Change-Id: I009bcd5c166f2bfa0795d2718fabab4a549eba9f
/frameworks/layoutlib/bridge/src/android/content/res/BridgeTypedArray.java
|
129839107b12d1d42ce53a2b7ed0895589b59ff6 |
|
14-Dec-2015 |
Jerome Gaillard <jgaillard@google.com> |
Get color state list file content from PSI instead of disk Use new functionality from callback to get the content of state list files from PSI instead of disks. Bug: http://b.android.com/183767 Change-Id: Ic256d1e7787209d772ccd42c2e3c7f409cac2964
/frameworks/layoutlib/bridge/src/android/content/res/BridgeTypedArray.java
|
37e93696222aed44026f6423dd05ebc7c3c72b71 |
|
24-Sep-2015 |
Deepanshu Gupta <deepanshu@google.com> |
Fix TypedArray.getTextArray() Change-Id: Ic55b52840892fbf2a4258ba97ed31ca0283da8ed
/frameworks/layoutlib/bridge/src/android/content/res/BridgeTypedArray.java
|
b7a03c66dfbfed6ce8197b1fbc2aec8925bc410c |
|
04-Aug-2015 |
Deepanshu Gupta <deepanshu@google.com> |
Make getInt in BridgeTypedArray accept empty String. 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
/frameworks/layoutlib/bridge/src/android/content/res/BridgeTypedArray.java
|
1756dd0960657fca929ced5df044cd00e24b64db |
|
28-May-2015 |
Deepanshu Gupta <deepanshu@google.com> |
Fix BridgeTypedArray.getType() Also includes some fixes for BridgeTypedArray.getInt() - when value is a color, when value is an octal int, when value is true/false. Bug: http://b.android.com/162438 Change-Id: I0b985ea3437be8018d0e116e7a599843cc7aacd6
/frameworks/layoutlib/bridge/src/android/content/res/BridgeTypedArray.java
|
442aee6bc1abfb143dcfa1ba60d696e576d066c4 |
|
22-May-2015 |
Deepanshu Gupta <deepanshu@google.com> |
LayoutLib: Change nullity annotations. Switch from using tools nullity annotations (com.android.annotations) to android framework annotations (android.annotation). A new sdk-common prebuilt is required for LayoutLib tests. The new sdk-common requires an updated tools-common. The updated tools-common doesn't have nullity annotations. So, instead of adding the annotation dependency, just reuse the platform ones. This also paves the way to include other platform annotations like IdRes etc. Change-Id: I87b8f767d3681d914abe7d1329e26a87f49f50a7
/frameworks/layoutlib/bridge/src/android/content/res/BridgeTypedArray.java
|
7edbbf5f73f31ec568b391b6cb8d6ee0955c82b0 |
|
21-May-2015 |
Deepanshu Gupta <deepanshu@google.com> |
Use non deprecated method for creating ColorStateList Change-Id: I9fce928276c8a2af55eb0615a4895abb6a973be5
/frameworks/layoutlib/bridge/src/android/content/res/BridgeTypedArray.java
|
a9d1c5b4e2bd54b0e77c817b0813bec6cddc0eac |
|
19-May-2015 |
Deepanshu Gupta <deepanshu@google.com> |
Fix include tag rendering. A missing catch clause caused rendering to be failed when there is an include tag that doesn't specify layout_width and layout_height. Also improve the error messages to make debugging easier next time. Change-Id: I617762636973a010b34da167c7b5fcd328b7d178
/frameworks/layoutlib/bridge/src/android/content/res/BridgeTypedArray.java
|
9fe7fca9bcdceade9c654c6a8dcf0c48be16d78d |
|
12-May-2015 |
Deepanshu Gupta <deepanshu@google.com> |
Add missing delegates for M preview. - Remove ICU dependency (use the version bundled with platform). - Restructure intelliJ project to move dependencies to module. - Minor fixes to layoutlib tests. TODO: - Load ICU data. - Hyphenator doesn't work. - High quality line breaker not present. Change-Id: I965e096e17bfc97ee995a649c3f4f6f64bb4f70d
/frameworks/layoutlib/bridge/src/android/content/res/BridgeTypedArray.java
|
b111e84752652ec862efa7e0fcaa224430feb97f |
|
15-Apr-2015 |
Deepanshu Gupta <deepanshu@google.com> |
Update to using LayoutlibCallback. Change-Id: Ia89d418b0d40ca8efef8968a4a2a635616b945ac
/frameworks/layoutlib/bridge/src/android/content/res/BridgeTypedArray.java
|
6f3ccf0e18239aa6d8d5b352cf7d411f8716e0a7 |
|
30-Mar-2015 |
Deepanshu Gupta <deepanshu@google.com> |
Add @empty support. Bug: http://b.android.com/162428 Change-Id: Id7a981de2fce21213e12cdabcce4104f146fd4d3
/frameworks/layoutlib/bridge/src/android/content/res/BridgeTypedArray.java
|
c8a55f3e2e36475d8a86a5967a9f2db629e02d1c |
|
16-Jan-2015 |
Deepanshu Gupta <deepanshu@google.com> |
Resource resolution fixes. 1. Some dynamic ids weren't created and resulted in ResourceNotFound exceptions. 2. Prevent NPE if a style attribute (eg. style="?attr/foo"), which cannot be resolved, is resolved. This effectively, also results in making it harder to catch misconfigured themes. However, support library does it, and we don't want to throw errors when the library is working as intended. Change-Id: I731d8fb9209eb72b464d235d1072d416e132970b
/frameworks/layoutlib/bridge/src/android/content/res/BridgeTypedArray.java
|
ca617d8a82e46474f597fe9a9b13bf0abc89f0ba |
|
28-Oct-2014 |
Deepanshu Gupta <deepanshu@google.com> |
Use right theme for drawable inflation. The theme information was lost when inflating drawables. As a result, drawables inflated in the ActionBar did not have the right tint. Change-Id: I13d5c78039e35085ed4902289fcb735bb15d972e
/frameworks/layoutlib/bridge/src/android/content/res/BridgeTypedArray.java
|
e77c203bd64b0d4a846e9d9e2155b6238620009d |
|
02-Oct-2014 |
Deepanshu Gupta <deepanshu@google.com> |
Minor style changes. Addressing code review comments on previous change: 171804201dd Change-Id: I2c9e0ce35e755c23d8292749828d15a87109d6dc
/frameworks/layoutlib/bridge/src/android/content/res/BridgeTypedArray.java
|
32645d9875e40b2b4719ce77a0c8bf753028e854 |
|
29-Sep-2014 |
Deepanshu Gupta <deepanshu@google.com> |
Always resolve enum when resolving resources. Enums were resolved only for integers and dimensions. This change resolves enums for all resource types. Well, almost all. For color and colorStateList, enums are still not referenced. Bug: http://b.android.com/76091 Change-Id: Ie43bd1b54fb9877655d31773bdf71d9a6a65c473
/frameworks/layoutlib/bridge/src/android/content/res/BridgeTypedArray.java
|
fa71ebfc3336f35f455d72e3250d225705725dad |
|
04-Sep-2014 |
Deepanshu Gupta <deepanshu@google.com> |
Remove warning for null entries in resource array. Change-Id: I32e0b8129e29f3e1e5a472b26e16f3fd06d4b91b
/frameworks/layoutlib/bridge/src/android/content/res/BridgeTypedArray.java
|
acba77c627d6bec98a796966b04a85c06467600a |
|
26-Aug-2014 |
Deepanshu Gupta <deepanshu@google.com> |
enums in dimension attributes. enums in resources were only read for integer attributes. This change parses the enums for dimension resources also. This also means that we don't have to hardcode the resolution for match_parent and wrap_content. TODO: Fix this for all resource types. Bug: http://b.android.com/75285 Change-Id: I86752b2322ea017499942a87568ba5c54b8654e4
/frameworks/layoutlib/bridge/src/android/content/res/BridgeTypedArray.java
|
d0cf227ef57e88fa9e104ea1dd2f7fa0555adbdd |
|
26-Aug-2014 |
Deepanshu Gupta <deepanshu@google.com> |
Null out "@null" attributes. Remove references to the resourceValue for "@null". This saves needless checking for "@null" every time an attribute is requested. Change-Id: I816e78619fa0b1ddcacd1ef5ac90765e30a9a44c
/frameworks/layoutlib/bridge/src/android/content/res/BridgeTypedArray.java
|
bd08d4ab5796923172c02e81f42894589c5f3d3c |
|
20-Aug-2014 |
Deepanshu Gupta <deepanshu@google.com> |
Fix "@null" resource values in LayoutLib. Bug: http://b.android.com/74072 Change-Id: Ib84906d86772ac3df2407e71ad2167797bec4542
/frameworks/layoutlib/bridge/src/android/content/res/BridgeTypedArray.java
|
eeb44a29846ac0d36a1fad1b6869e932d1dc01ce |
|
10-Jul-2014 |
Deepanshu Gupta <deepanshu@google.com> |
Update delegates Change-Id: Icd93c31b4e8c8ee5ea242fb8295578937f48ff2a
/frameworks/layoutlib/bridge/src/android/content/res/BridgeTypedArray.java
|
f0a7a1cb5b3ab8e9f46128c57dd8745e39706fbb |
|
23-May-2014 |
Deepanshu Gupta <deepanshu@google.com> |
Stopgap fix for layoutlib. This is a temporary fix for changes made to TypedArray regrading theme attributes. Change-Id: I173fde6d8d3259479b0654ff331bc27bf2814fb0
/frameworks/layoutlib/bridge/src/android/content/res/BridgeTypedArray.java
|
28948de70d6f77f80b475926c2b88f55e1365ff4 |
|
26-Mar-2014 |
Deepanshu Gupta <deepanshu@google.com> |
Add stub getThemeAttributeId() to BridgeTypedArray The method is used to obtain theme attribute IDs for drawables for caching. The changeset also fixes some minor style issues found by code inspection. Change-Id: Ib5fe05511397b5ec7cb8e64f6b2769ec2c355f41
/frameworks/layoutlib/bridge/src/android/content/res/BridgeTypedArray.java
|
444b1a7f19dd6336264b4f6508fec6fbf491d201 |
|
15-Feb-2014 |
Deepanshu Gupta <deepanshu@google.com> |
Fix layoutlib by avoiding Java7 calls This change also fixes a NPE in TypedArray caused by changes in the framework. Change-Id: Ie64237c567fa16c35c807db22ce9a4b609ee411d
/frameworks/layoutlib/bridge/src/android/content/res/BridgeTypedArray.java
|
ab775ecdd189b32e35b0d3f4a821502f88b03a4b |
|
24-Jan-2014 |
Adam Lesinski <adamlesinski@google.com> |
Revert "Move frameworks/base/tools/ to frameworks/tools/" This reverts commit 9f6a119c8aa276432ece4fe2118bd8a3c9b1067e.
/frameworks/layoutlib/bridge/src/android/content/res/BridgeTypedArray.java
|