Position clock and notifications dynamically.
The positioning is dependant on how many notifications are currently
showing. This makes sure that the lockscreen always looks balanced
and harmonic.
Bug: 14592994
Change-Id: Ic647b887dd23e6cc5ecd07d70f279ff2f218f4ca
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java
index dde2ebb..517f763 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java
@@ -322,7 +322,7 @@
setOnHierarchyChangeListener(mHierarchyListener);
}
- private void loadDimens() {
+ protected void loadDimens() {
final Resources res = getContext().getResources();
mSelfExpandVelocityPx = res.getDimension(R.dimen.self_expand_velocity);
@@ -583,10 +583,16 @@
@Override
protected void onFinishInflate() {
super.onFinishInflate();
-
loadDimens();
}
+ @Override
+ protected void onConfigurationChanged(Configuration newConfig) {
+ super.onConfigurationChanged(newConfig);
+ loadDimens();
+ mMaxPanelHeight = -1;
+ }
+
public void fling(float vel, boolean always) {
if (DEBUG) logf("fling: vel=%.3f, this=%s", vel, this);
mVel = vel;
@@ -697,12 +703,6 @@
mExpandedFraction = Math.min(1f, (fh == 0) ? 0 : h / fh);
}
- @Override
- protected void onConfigurationChanged(Configuration newConfig) {
- super.onConfigurationChanged(newConfig);
- mMaxPanelHeight = -1;
- }
-
protected void onHeightUpdated(float expandedHeight) {
requestLayout();
}