diff options
| author | Adam Powell <adamp@google.com> | 2011-02-08 16:20:15 -0800 |
|---|---|---|
| committer | Adam Powell <adamp@google.com> | 2011-02-08 16:24:15 -0800 |
| commit | 50efbed668a9410cdec51f7c8604fa44ed267fed (patch) | |
| tree | 080d33737acdb9ec4e980a503b290369eb769e46 /core/java/android/app/Dialog.java | |
| parent | 2157f045d3579cb789d7c2c4f892724c7b0b1b39 (diff) | |
Fix bug 3345948 - ActionBar.show()/hide() shouldn't animate if called
before first layout
Enable/disable the action bar show/hide animation as part of the
activity/dialog lifecycle. This allows apps to set action bar
visibility state as the activity first becomes visible or returns to
visibility without the associated animation.
Change-Id: I85ff9268d2cb2c8fcd3364dd275597fe90529224
Diffstat (limited to 'core/java/android/app/Dialog.java')
| -rw-r--r-- | core/java/android/app/Dialog.java | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/core/java/android/app/Dialog.java b/core/java/android/app/Dialog.java index de5d6a1bdf18..cc4fefc3ea3b 100644 --- a/core/java/android/app/Dialog.java +++ b/core/java/android/app/Dialog.java @@ -352,12 +352,14 @@ public class Dialog implements DialogInterface, Window.Callback, * Called when the dialog is starting. */ protected void onStart() { + if (mActionBar != null) mActionBar.setShowHideAnimationEnabled(true); } /** * Called to tell you that you're stopping. */ protected void onStop() { + if (mActionBar != null) mActionBar.setShowHideAnimationEnabled(false); } private static final String DIALOG_SHOWING_TAG = "android:dialogShowing"; |
