summaryrefslogtreecommitdiffstats
path: root/core/java/android/util
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2010-10-18 17:02:43 -0700
committerDianne Hackborn <hackbod@google.com>2010-11-03 19:11:19 -0700
commit079e23575024e103358c982152afb7a720ae1a8a (patch)
treebb87037321dfc3be8fcf7c64737fa0fdca3ceb5c /core/java/android/util
parent079fd674fb9005771dd383a1a483d7dc5072b5b3 (diff)
downloadframeworks_base-079e23575024e103358c982152afb7a720ae1a8a.zip
frameworks_base-079e23575024e103358c982152afb7a720ae1a8a.tar.gz
frameworks_base-079e23575024e103358c982152afb7a720ae1a8a.tar.bz2
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
Diffstat (limited to 'core/java/android/util')
-rw-r--r--core/java/android/util/StateSet.java1
1 files changed, 1 insertions, 0 deletions
diff --git a/core/java/android/util/StateSet.java b/core/java/android/util/StateSet.java
index f3d8159..21d8e45 100644
--- a/core/java/android/util/StateSet.java
+++ b/core/java/android/util/StateSet.java
@@ -38,6 +38,7 @@ import com.android.internal.R;
public class StateSet {
public static final int[] WILD_CARD = new int[0];
+ public static final int[] NOTHING = new int[] { 0 };
/**
* Return whether the stateSetOrSpec is matched by all StateSets.