summaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorDaniel Sandler <dsandler@google.com>2011-03-02 11:52:58 -0500
committerDaniel Sandler <dsandler@google.com>2011-03-02 12:14:21 -0500
commit21eb86a5c464205155a9ea14486113055c2dffc9 (patch)
treee866bb9cd01fb6a842596afa3f48737022ec83b6 /packages
parent957ac32633f78d27110da47993c752fb5fccff80 (diff)
downloadframeworks_base-21eb86a5c464205155a9ea14486113055c2dffc9.zip
frameworks_base-21eb86a5c464205155a9ea14486113055c2dffc9.tar.gz
frameworks_base-21eb86a5c464205155a9ea14486113055c2dffc9.tar.bz2
Bring back some status bar animations.
Change Ie817b396 removed the layout transition from the main status bar, fixing a number of weird bugs caused by the translations on CHANGE_APPEARING and CHANGE_DISAPPEARING. This change restores the layout transitions, but only the alpha fade on APPEARING and DISAPPEARING. Doing this should bring back the useful part of the status bar animations (i.e. things fading in & out) without the buggy part (things sliding around to make room for the things fading in & out). Additionally, these fade-only layout transitions are now properly applied to the clock/notification area (when bringing up the notifications panel) and the icons within the navigation cluster (so the legacy MENU key will fade in). Bug: 3503960 Bug: 3489129 Change-Id: I1ea433c41f2f930342ae2486505b0fee19709f9c
Diffstat (limited to 'packages')
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java27
1 files changed, 21 insertions, 6 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java
index 5ab808c..4557105 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java
@@ -115,7 +115,7 @@ public class TabletStatusBar extends StatusBar implements
View mNotificationArea;
View mNotificationTrigger;
NotificationIconArea mNotificationIconArea;
- View mNavigationArea;
+ ViewGroup mNavigationArea;
boolean mNotificationDNDMode;
NotificationData.Entry mNotificationDNDDummyEntry;
@@ -146,7 +146,8 @@ public class TabletStatusBar extends StatusBar implements
LocationController mLocationController;
NetworkController mNetworkController;
- View mBarContents;
+ ViewGroup mBarContents;
+ LayoutTransition mBarContentsLayoutTransition;
// hide system chrome ("lights out") support
View mShadow;
@@ -346,7 +347,20 @@ public class TabletStatusBar extends StatusBar implements
sb.setHandler(mHandler);
- mBarContents = sb.findViewById(R.id.bar_contents);
+ mBarContents = (ViewGroup) sb.findViewById(R.id.bar_contents);
+ // layout transitions for the status bar's contents
+ mBarContentsLayoutTransition = new LayoutTransition();
+ // add/removal will fade as normal
+ mBarContentsLayoutTransition.setAnimator(LayoutTransition.APPEARING,
+ ObjectAnimator.ofFloat(null, "alpha", 0f, 1f));
+ mBarContentsLayoutTransition.setAnimator(LayoutTransition.DISAPPEARING,
+ ObjectAnimator.ofFloat(null, "alpha", 1f, 0f));
+ // no animations for siblings on change: just jump into place please
+ mBarContentsLayoutTransition.setAnimator(LayoutTransition.CHANGE_APPEARING, null);
+ mBarContentsLayoutTransition.setAnimator(LayoutTransition.CHANGE_DISAPPEARING, null);
+ // quick like bunny
+ mBarContentsLayoutTransition.setDuration(250 * (DEBUG?10:1));
+ mBarContents.setLayoutTransition(mBarContentsLayoutTransition);
// the whole right-hand side of the bar
mNotificationArea = sb.findViewById(R.id.notificationArea);
@@ -385,11 +399,12 @@ public class TabletStatusBar extends StatusBar implements
// The navigation buttons
mBackButton = (ImageView)sb.findViewById(R.id.back);
- mNavigationArea = sb.findViewById(R.id.navigationArea);
+ mNavigationArea = (ViewGroup) sb.findViewById(R.id.navigationArea);
mHomeButton = mNavigationArea.findViewById(R.id.home);
mMenuButton = mNavigationArea.findViewById(R.id.menu);
mRecentButton = mNavigationArea.findViewById(R.id.recent_apps);
mRecentButton.setOnClickListener(mOnClickListener);
+ mNavigationArea.setLayoutTransition(mBarContentsLayoutTransition);
// The bar contents buttons
mNotificationAndImeArea = (ViewGroup)sb.findViewById(R.id.notificationAndImeArea);
@@ -574,7 +589,7 @@ public class TabletStatusBar extends StatusBar implements
if (!mNotificationPanel.isShowing()) {
mNotificationPeekWindow.setVisibility(View.GONE);
mNotificationPanel.show(true, true);
- mNotificationArea.setVisibility(View.GONE);
+ mNotificationArea.setVisibility(View.INVISIBLE);
mTicker.halt();
}
break;
@@ -832,7 +847,7 @@ public class TabletStatusBar extends StatusBar implements
if ((diff & StatusBarManager.DISABLE_NAVIGATION) != 0) {
if ((state & StatusBarManager.DISABLE_NAVIGATION) != 0) {
Slog.i(TAG, "DISABLE_NAVIGATION: yes");
- mNavigationArea.setVisibility(View.GONE);
+ mNavigationArea.setVisibility(View.INVISIBLE);
mInputMethodSwitchButton.setScreenLocked(true);
} else {
Slog.i(TAG, "DISABLE_NAVIGATION: no");