4a81674b45b7250c4e2a80330371f7aa1c066d05 |
|
02-Feb-2017 |
Jiaquan He <hejq@google.com> |
Detect unhandled keyboard focused state. A View uses a Drawable as its background, which changes its appearance according to the View's state. This commit adds an algorithm to detect undefined state_focused in state specs for those Drawables. Test: cts-tradefed run singleCommand cts --skip-device-info --skip-preconditions --abi armeabi-v7a -m CtsGraphicsTestCases -t android.graphics.drawable.cts.DefaultFocusHighlightTest Bug: 35096940 Change-Id: I5e9f07141679881fe88f9040aa116ea2f9d537c9
/frameworks/base/graphics/java/android/graphics/drawable/StateListDrawable.java
|
f1f5f6fcaa768c5b88e9a56f18cbd6ecf72755a8 |
|
21-Oct-2015 |
Alan Viverette <alanv@google.com> |
Reset constant width/height when DrawableContainer density changes Bug: 25081461 Change-Id: I9661e964e1d0bacd337e31073faf870d37939b51
/frameworks/base/graphics/java/android/graphics/drawable/StateListDrawable.java
|
06ff2af68aa1041eeb26778e994e0fe196bf8b1e |
|
24-Jun-2015 |
Alan Viverette <alanv@google.com> |
Update local state when creating LayerDrawable from constant state Also clears DrawableContainer's futures list when it's no longer needed, correctly sets deep copy of state set in StateListDrawable, makes some private methods into package-protected to avoid thunk, and propagates state to StateListDrawable's super class so that getState() has correct information. Bug: 21840003 Change-Id: I0d4232807f280d663c03b4a80e4aab8626806440
/frameworks/base/graphics/java/android/graphics/drawable/StateListDrawable.java
|
a12962207155305da44b5a1b8fb9acaed358c14c |
|
21-Feb-2015 |
Alan Viverette <alanv@google.com> |
Unify wrapper-type drawables Fixes several issues with constant state and propagation of drawable property changes to wrapped drawables. Also un-hides the layout direction accessors and hotspot getter. Change-Id: Iff19db6a95059cbcfcbde7af0ac33871ccd41615
/frameworks/base/graphics/java/android/graphics/drawable/StateListDrawable.java
|
8dcd533786df8d824f1e040230ee9e7e5b083998 |
|
25-Nov-2014 |
Alan Viverette <alanv@google.com> |
Ensure calling mutate() on DrawableContainer creates a new state Previously, a new state would only be created on newDrawable(), which caused the first drawable loaded for a resource to share constant state with the cached version. Even if mutate() was called, the constant state was still shared and any changes were applied to the cached copy. BUG: 18504919 Change-Id: I40d257867eb0a092ce580b9c4338ddc7406a031d
/frameworks/base/graphics/java/android/graphics/drawable/StateListDrawable.java
|
cf84ab5e7f860a716f9a789a5d5d5f4378a8204c |
|
25-Nov-2014 |
John Reck <jreck@google.com> |
Revert "Ensure calling mutate() on DrawableContainer creates a new state" This reverts commit d7dab349c2af0e4bde188b1969f0c697b217dd57. Change-Id: Icc1c4bfa296a59a551088fe7cc2449a97bb2b7b7 Reason: Broke the build
/frameworks/base/graphics/java/android/graphics/drawable/StateListDrawable.java
|
d7dab349c2af0e4bde188b1969f0c697b217dd57 |
|
24-Nov-2014 |
Alan Viverette <alanv@google.com> |
Ensure calling mutate() on DrawableContainer creates a new state Previously, a new state would only be created on newDrawable(), which caused the first drawable loaded for a resource to share constant state with the cached version. Even if mutate() was called, the constant state was still shared and any changes were applied to the cached copy. BUG: 18504919 Change-Id: I1ce76fbbc144e9c0c93261e3a12cc613d0c74b83
/frameworks/base/graphics/java/android/graphics/drawable/StateListDrawable.java
|
d6570d11e4d1e43c2cfe1d10e27a7786c4283169 |
|
06-Nov-2014 |
Alan Viverette <alanv@google.com> |
Support theme attributes in StateListDrawable <item> element Also adds support for specifying drawable as a color since getDrawable() automatically wraps colors to ColorDrawable. Does not currently allow themed item elements to be used in Zygote preload, but we can add that at some point in the future. BUG: 18208662 Change-Id: I4c9721ffd100da4b9db7743a46c914828b943dae
/frameworks/base/graphics/java/android/graphics/drawable/StateListDrawable.java
|
d21fd9d1ccd2b525f9c004a6cd9ba19a645701ab |
|
29-Oct-2014 |
Alan Viverette <alanv@google.com> |
Add theme and config change support to more Drawable types BUG: 16045735 Change-Id: Ic03173a1c1779c1bb545c4c389f77afed97011ee
/frameworks/base/graphics/java/android/graphics/drawable/StateListDrawable.java
|
17cd4dfe3a05c2eddbcbc76066ff3b13fc3f2c8b |
|
14-Oct-2014 |
Alan Viverette <alanv@google.com> |
Update preload list, clean up drawable theming Removes all implementations of three-arg ConstantState constructor, since we handle mutation and applyTheme() in Resources now. Moves progress bar tinting to android:tint attribute. Correctly implements applyTheme() and canApplyTheme() in all drawable wrapper and container classes. Change-Id: Ic9cb43d0d6228aa4914f3124bed234b837beaa41
/frameworks/base/graphics/java/android/graphics/drawable/StateListDrawable.java
|
727cae197b123ef764a1f8fbe08a995b000d14c3 |
|
08-Oct-2014 |
Alan Viverette <alanv@google.com> |
Mutate and apply theme if needed before caching themed drawables This ensures that drawables are completely separated from their cached constant states before applying a theme. After this, we can remove the implicit (and incomplete) mutation in the clone constructors. Also implements missing mutate() method on ClipDrawable. BUG: 17646144 Change-Id: If0d66b0a85724d76e0a4f506758c7ba3c0aa3410
/frameworks/base/graphics/java/android/graphics/drawable/StateListDrawable.java
|
39e33621a725bcdaa21a723866e53c6ea3356169 |
|
03-Oct-2014 |
Alan Viverette <alanv@google.com> |
Fix theme propagation to contained android:drawable elements BUG: 17790666 Change-Id: I6733a98e779cad0d384b917c57d2b3409a166c02
/frameworks/base/graphics/java/android/graphics/drawable/StateListDrawable.java
|
ad55abdc748f2cba6955e9e60cf7964dc027f2b5 |
|
12-Aug-2014 |
Alan Viverette <alanv@google.com> |
Fix NPE in NinePatchDrawable, propagate theme in StateListDrawable BUG: 16979150 BUG: 16957778 Change-Id: I5e7116fe7fd3d5d177bafa88aad08ab21ae1677d
/frameworks/base/graphics/java/android/graphics/drawable/StateListDrawable.java
|
b3c56086d802ae28888dd97ba1f49bd6cee0b673 |
|
14-Jun-2014 |
Alan Viverette <alanv@google.com> |
Add support for setTint in all Drawables, clean up lint warnings Change-Id: I962089ca59684cef28cb4a648d4a91e542bdf5d4
/frameworks/base/graphics/java/android/graphics/drawable/StateListDrawable.java
|
cda212d79d449468384cc7744878b8c99984059c |
|
14-Jun-2014 |
Jeff Brown <jeffbrown@google.com> |
Revert "Add support for setTint in all Drawables, clean up lint warnings" This reverts commit 381f83b613f7b6e71180983dbb992ff62f8dd6e3. Change-Id: I1181f436c647216ac46162260d9d886197b24568
/frameworks/base/graphics/java/android/graphics/drawable/StateListDrawable.java
|
4b17118aca1e67963254ab83504b0753a3eac7ce |
|
14-Jun-2014 |
Alan Viverette <alanv@google.com> |
Add support for setTint in all Drawables, clean up lint warnings Change-Id: Ia38b9d3e9d5c0072382050e815bdd9232b672e50
/frameworks/base/graphics/java/android/graphics/drawable/StateListDrawable.java
|
6dbe51b50e82057af4d29882889444d22ac19c9c |
|
03-Jun-2014 |
Alan Viverette <alanv@google.com> |
Clean up drawable theming APIs Removes APIs for themed creation of a drawable from a stream, since that doesn't involve any inflation. Also cleans up tinting methods left over from previous clean up. BUG: 15089957 Change-Id: I2af7aa9a6d351ae61b33ee1216c674fae1bffe11 Signed-off-by: Alan Viverette <alanv@google.com>
/frameworks/base/graphics/java/android/graphics/drawable/StateListDrawable.java
|
5e92c95d847a68178cf6099c801f82dcb7e4fa47 |
|
09-May-2014 |
Alan Viverette <alanv@google.com> |
Animated state transition drawable Change-Id: I6c795d55cd7ab9163fdd6fe6ce3771bbd7015d62
/frameworks/base/graphics/java/android/graphics/drawable/StateListDrawable.java
|
52b999f0721b53e9c6e18a4bd664e89aeb65b2d5 |
|
25-Mar-2014 |
Alan Viverette <alanv@google.com> |
Implement APIs for obtaining, caching themed Drawables When Drawables are inflated during preload (or otherwise without a theme) they cache their themeable attributes in their constant state as an array keyed on attribute index. Drawables inflated with a theme will simply resolve theme attributes as part of normal inflation, and they will not cache any themeable attributes. Drawables obtained from Resources are pulled from theme-specific cache when possible. If an unthemed Drawable exists in the preload cache, a new constant state will be obtained for the Drawable and the theme will be applied by resolving the cached themeable attributes and overwriting their respective constant state properties. If no cached version exists, a new Drawable is inflated against the desired theme. Constant states from themed drawables may be cached if the applied theme is "pure" and was loaded from a style resource without any subsequent modifications. This CL does not handle applying themes to several Drawable types, but it fully supports BitmapDrawable, GradientDrawable, NinePatchDrawable, ColorDrawable, and TouchFeedbackDrawable. BUG: 12611005 Change-Id: I4e794fbb62f7a371715f4ebdf946ee5f9a5ad1c9
/frameworks/base/graphics/java/android/graphics/drawable/StateListDrawable.java
|
3f5a90b2fbba2a83a8a2c5babd5d466a5e0ad2aa |
|
25-Jun-2013 |
Fabrice Di Meglio <fdimeglio@google.com> |
Add automatic Drawable mirroring capability when in RTL layout direction - default value is "no mirroring" - introduce android:autoMirrored as a new attribute for Drawable, BitmapDrawable, LayerDrawable, StateListDrawable and NinePatchDrawable - setting android:autoMirrored="true" means that the drawable will be mirrored when the layout direction is RTL (right-to-left) - also fix an issue with ImageView drawable layout direction not updated correctly when RTL properties were changed See bug #7034321 Need Drawable RTL support Change-Id: If595ee5106c786f38e786d3a032e182f784a9d97
/frameworks/base/graphics/java/android/graphics/drawable/StateListDrawable.java
|
f390f770ee570f1f4def41b165cb9492e381be40 |
|
14-Jun-2013 |
Alan Viverette <alanv@google.com> |
Postpone creating new drawables for DrawableContainerState. When creating a DrawableContainerState from a constant state, calls to ConstantState.newDrawable() are postponed and made as they are needed. Bug: 9280861 Change-Id: I03c93a43ee00aca3ff618d66d7f507f1722538d1
/frameworks/base/graphics/java/android/graphics/drawable/StateListDrawable.java
|
72146433322588c1116ee06c27ac758ad09d869c |
|
06-Jun-2013 |
Alan Viverette <alanv@google.com> |
Deprecate DrawableStateList.getChildren() and add getChild(). Moves from exposing the internal structure of a drawable state list to only exposing the data. Adds getCapacity() and mutate() as package-private APIs to support various drawable subclasses. Change-Id: Id08743f979287e1a305f069ccc3c0085a7da6f7b
/frameworks/base/graphics/java/android/graphics/drawable/StateListDrawable.java
|
fc4947491f785600b8770112fa1d19ece06d42f9 |
|
28-Sep-2012 |
Dianne Hackborn <hackbod@google.com> |
Update APIs to JB MR1 level 17. 17 is current, resources are fixed, cleanup is done. Change-Id: I6de446e209f59c5dd5fe1cde311776ab222817ea
/frameworks/base/graphics/java/android/graphics/drawable/StateListDrawable.java
|
0af4b8b0c8b038bca9b4f60eb81f71e186f471ce |
|
12-Jun-2012 |
Fabrice Di Meglio <fdimeglio@google.com> |
Make ProgressBar / SeekBar / RatingBar widgets aware of layout direction - see bug #5429822 UI should be mirrored for RTL locales (Arabic, Hebrew, farsi) Change-Id: I8d76299090abf6b2b187696b1a83e71d7a44b1ce
/frameworks/base/graphics/java/android/graphics/drawable/StateListDrawable.java
|
079e23575024e103358c982152afb7a720ae1a8a |
|
19-Oct-2010 |
Dianne Hackborn <hackbod@google.com> |
Add new fade in/out feature for drawable containers. This is used to allow list view's pressed and activated indicators to fade in an out, though of course it can be used elsewhere as well. There is a lot of complexity in supporting this in list view. The two main things that are being dealt with: - When recycling views, we need to make sure that the view's drawable state doesn't get animated from an old row's state. The recycler now keeps track of which position a view was last in, and if it is reused at a new position there is a new View/Drawable API to tell it to jump to its current state instead of animating. - For the pressed indicator to fade out, we need to keep displaying it after it is hidden. There are new variables and code to keep track of this state, and tweaks in various places to be able to remember the last selected position and continue updating the drawable bounds as needed. Change-Id: Ic96aa1a3c05e519665abf3098892ff2cc4f0ef2f
/frameworks/base/graphics/java/android/graphics/drawable/StateListDrawable.java
|
dfe5c204403bc56c29bb36410574eab8b1950417 |
|
09-Jun-2010 |
Scott Main <smain@google.com> |
docs: lots of additions to the resources docs new drawable resources add <merge> and <include> to layout resource update drawable class descriptioons to point to resources guide add ID resource type Change-Id: I733eec50bb2671f28c9e6dd7dec14eb6586f5193
/frameworks/base/graphics/java/android/graphics/drawable/StateListDrawable.java
|
2b95c2413838c2e2b127ebab8fb4fead7d52e460 |
|
09-Feb-2010 |
Jeff Sharkey <jsharkey@android.com> |
Added more @RemotableViewMethod methods, mutate ImageView. Catch some View methods missed during the first pass of marking with @RemotableViewMethod annotation. Also adds new ImageView.setColorFilter(int) to match the android:tint XML attribute. When ImageView touches ColorFilter or alpha, mutate the underlying Drawable. Fix NPE in StateListDrawable.mutate().
/frameworks/base/graphics/java/android/graphics/drawable/StateListDrawable.java
|
c2974809373697147cbe5754835cc871fb93aef1 |
|
14-Sep-2009 |
Dianne Hackborn <hackbod@google.com> |
Fix issue #2116977: buttons are huge and bent Now that we are using preloaded drawables in compatibilty mode, when constructing them from their constant state we need to set the new drawable's target density appropriately. Change-Id: I3665cbea09d38b9ac5f45f8c380dc8641f86b266
/frameworks/base/graphics/java/android/graphics/drawable/StateListDrawable.java
|
211db4a2874f1a2d0e7a8cb8d33e81fa08801763 |
|
11-Sep-2009 |
Mike Reed <reed@google.com> |
change default for dither to true
/frameworks/base/graphics/java/android/graphics/drawable/StateListDrawable.java
|
6afa16feb32d44c4977b3eb6007246a99f22fdbf |
|
20-Aug-2009 |
Jeff Sharkey <jsharkey@android.com> |
Add dither XML flag to StateListDrawable. We currently allow the dither="true" flag to be set on individual <bitmap> and <nine-patch> objects, but that flag is overridden when they are included in a <selector>. This change adds the dither="true" flag to StateListDrawable so they can be dithered when desired. Fixes http://b/issue?id=2068024
/frameworks/base/graphics/java/android/graphics/drawable/StateListDrawable.java
|
9066cfe9886ac131c34d59ed0e2d287b0e3c0087 |
|
04-Mar-2009 |
The Android Open Source Project <initial-contribution@android.com> |
auto import from //depot/cupcake/@135843
/frameworks/base/graphics/java/android/graphics/drawable/StateListDrawable.java
|
d83a98f4ce9cfa908f5c54bbd70f03eec07e7553 |
|
04-Mar-2009 |
The Android Open Source Project <initial-contribution@android.com> |
auto import from //depot/cupcake/@135843
/frameworks/base/graphics/java/android/graphics/drawable/StateListDrawable.java
|
076357b8567458d4b6dfdcf839ef751634cd2bfb |
|
03-Mar-2009 |
The Android Open Source Project <initial-contribution@android.com> |
auto import from //depot/cupcake/@132589
/frameworks/base/graphics/java/android/graphics/drawable/StateListDrawable.java
|
3dec7d563a2f3e1eb967ce2054a00b6620e3558c |
|
03-Mar-2009 |
The Android Open Source Project <initial-contribution@android.com> |
auto import from //depot/cupcake/@137055
/frameworks/base/graphics/java/android/graphics/drawable/StateListDrawable.java
|
d24b8183b93e781080b2c16c487e60d51c12da31 |
|
11-Feb-2009 |
The Android Open Source Project <initial-contribution@android.com> |
auto import from //branches/cupcake/...@130745
/frameworks/base/graphics/java/android/graphics/drawable/StateListDrawable.java
|
b798689749c64baba81f02e10cf2157c747d6b46 |
|
10-Jan-2009 |
The Android Open Source Project <initial-contribution@android.com> |
auto import from //branches/cupcake/...@125939
/frameworks/base/graphics/java/android/graphics/drawable/StateListDrawable.java
|
54b6cfa9a9e5b861a9930af873580d6dc20f773c |
|
21-Oct-2008 |
The Android Open Source Project <initial-contribution@android.com> |
Initial Contribution
/frameworks/base/graphics/java/android/graphics/drawable/StateListDrawable.java
|