Skip to content

Commit 682e9d9

Browse files
Quick Settings: Fix flip-to-settings animation
Bug is reproduced as follows: 1. close the notification area while Quick Settings is showing 2. open the notification area, so that the notifications show 3. click the button on the top, to switch to quick settings. Notice that only half of the animation is played. Having some notifications shown helps visualizing it. This bug was introduced by I3cab45f72fe3c5fa40d4631fc6a84ea7bfe51bd1 http://review.cyanogenmod.org/29118 (Yes, it was me. Sorry.) Change-Id: I31510617bf7e78fa09305a9c323b6ce30c058218
1 parent 7585d18 commit 682e9d9

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1592,6 +1592,11 @@ public void flipToNotifications() {
15921592
final boolean halfWayDone = mScrollView.getVisibility() == View.VISIBLE;
15931593
final int zeroOutDelays = halfWayDone ? 0 : 1;
15941594

1595+
if (!halfWayDone) {
1596+
mScrollView.setScaleX(0f);
1597+
mFlipSettingsView.setScaleX(1f);
1598+
}
1599+
15951600
// Only show the Power widget if it should be shown
15961601
mPowerWidget.updateVisibility();
15971602

@@ -1714,6 +1719,11 @@ public void flipToSettings() {
17141719
final boolean halfWayDone = mFlipSettingsView.getVisibility() == View.VISIBLE;
17151720
final int zeroOutDelays = halfWayDone ? 0 : 1;
17161721

1722+
if (!halfWayDone) {
1723+
mFlipSettingsView.setScaleX(0f);
1724+
mScrollView.setScaleX(1f);
1725+
}
1726+
17171727
mFlipSettingsView.setVisibility(View.VISIBLE);
17181728
mFlipSettingsViewAnim = start(
17191729
startDelay(FLIP_DURATION_OUT * zeroOutDelays,

0 commit comments

Comments
 (0)