From 079e23575024e103358c982152afb7a720ae1a8a Mon Sep 17 00:00:00 2001 From: Dianne Hackborn Date: Mon, 18 Oct 2010 17:02:43 -0700 Subject: 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 --- core/java/android/util/StateSet.java | 1 + 1 file changed, 1 insertion(+) (limited to 'core/java/android/util') 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. -- cgit v1.1