diff options
author | Mike LeBeau <mlebeau@android.com> | 2009-05-26 22:48:56 -0700 |
---|---|---|
committer | Mike LeBeau <mlebeau@android.com> | 2009-05-26 22:48:56 -0700 |
commit | 91bc6f2c57efb0faf8871f885667a451e091cdc5 (patch) | |
tree | 9d14fee26e7a3682bbe40fd93fcac85fbabd1be3 /core | |
parent | 04561a55df693e7bd8d3047ccc4fbef504ac07cf (diff) | |
download | frameworks_base-91bc6f2c57efb0faf8871f885667a451e091cdc5.zip frameworks_base-91bc6f2c57efb0faf8871f885667a451e091cdc5.tar.gz frameworks_base-91bc6f2c57efb0faf8871f885667a451e091cdc5.tar.bz2 |
Cause the icon drawables to animate automatically by calling setVisible
false and then true on the drawables. For an AnimationDrawable, this will
trigger the desired behavior of 'automatically' starting the animation,
which should have been working to begin with according to the intended
design of AnimationDrawable (see http://b/1878430 for my description of
my correspondence with Romain). For Donut we'll just do this to work
around it, but for a later release we need to decide a better story.
Diffstat (limited to 'core')
-rw-r--r-- | core/java/android/app/SuggestionsAdapter.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/core/java/android/app/SuggestionsAdapter.java b/core/java/android/app/SuggestionsAdapter.java index 2fe9a8d..aeb96b4 100644 --- a/core/java/android/app/SuggestionsAdapter.java +++ b/core/java/android/app/SuggestionsAdapter.java @@ -240,6 +240,14 @@ class SuggestionsAdapter extends ResourceCursorAdapter { v.setVisibility(View.GONE); } else { v.setVisibility(View.VISIBLE); + + // This is a hack to get any animated drawables (like a 'working' spinner) + // to animate. You have to setVisible true on an AnimationDrawable to get + // it to start animating, but it must first have been false or else the + // call to setVisible will be ineffective. We need to clear up the story + // about animated drawables in the future, see http://b/1878430. + drawable.setVisible(false, false); + drawable.setVisible(true, false); } } |