am f78a2353: am 25e1456e: Merge "Fade out the notification/settings panels just before close." into jb-mr1-dev
* commit 'f78a2353af27a1a7603298a6b960d2a645d898ba': Fade out the notification/settings panels just before close.
This commit is contained in:
@@ -206,6 +206,20 @@ public class PhoneStatusBarView extends PanelBar {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// fade out the panel as it gets buried into the status bar to avoid overdrawing the
|
||||||
|
// status bar on the last frame of a close animation
|
||||||
|
final int H = mBar.getStatusBarHeight();
|
||||||
|
final float ph = panel.getExpandedHeight() + panel.getPaddingBottom();
|
||||||
|
float alpha = 1f;
|
||||||
|
if (ph < 2*H) {
|
||||||
|
if (ph < H) alpha = 0f;
|
||||||
|
else alpha = (ph - H) / H;
|
||||||
|
alpha = alpha * alpha; // get there faster
|
||||||
|
}
|
||||||
|
if (panel.getAlpha() != alpha) {
|
||||||
|
panel.setAlpha(alpha);
|
||||||
|
}
|
||||||
|
|
||||||
mBar.updateCarrierLabelVisibility(false);
|
mBar.updateCarrierLabelVisibility(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user