From 6afa16feb32d44c4977b3eb6007246a99f22fdbf Mon Sep 17 00:00:00 2001 From: Jeff Sharkey Date: Thu, 20 Aug 2009 13:58:52 -0700 Subject: [PATCH] Add dither XML flag to StateListDrawable. We currently allow the dither="true" flag to be set on individual and objects, but that flag is overridden when they are included in a . This change adds the dither="true" flag to StateListDrawable so they can be dithered when desired. Fixes http://b/issue?id=2068024 --- core/res/res/values/attrs.xml | 6 +++++- .../java/android/graphics/drawable/StateListDrawable.java | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/core/res/res/values/attrs.xml b/core/res/res/values/attrs.xml index 403d07d12db17..cd3f065d6491a 100644 --- a/core/res/res/values/attrs.xml +++ b/core/res/res/values/attrs.xml @@ -2274,6 +2274,10 @@ of the states. If false, the size will vary based on the current state. --> + + @@ -2420,7 +2424,7 @@ - + diff --git a/graphics/java/android/graphics/drawable/StateListDrawable.java b/graphics/java/android/graphics/drawable/StateListDrawable.java index d22a4baaee697..a8274b12b6883 100644 --- a/graphics/java/android/graphics/drawable/StateListDrawable.java +++ b/graphics/java/android/graphics/drawable/StateListDrawable.java @@ -105,6 +105,8 @@ public class StateListDrawable extends DrawableContainer { mStateListState.setConstantSize(a.getBoolean( com.android.internal.R.styleable.StateListDrawable_constantSize, false)); + setDither(a.getBoolean(com.android.internal.R.styleable.StateListDrawable_dither, false)); + a.recycle(); int type;