Merge "Centering big clock vertically on large screen lockscreen and AOD" into sc-v2-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
03f25fd4af
@@ -89,7 +89,6 @@ public class KeyguardClockSwitchController extends ViewController<KeyguardClockS
|
|||||||
private final KeyguardUpdateMonitor mKeyguardUpdateMonitor;
|
private final KeyguardUpdateMonitor mKeyguardUpdateMonitor;
|
||||||
private final KeyguardBypassController mBypassController;
|
private final KeyguardBypassController mBypassController;
|
||||||
|
|
||||||
private int mLargeClockTopMargin = 0;
|
|
||||||
private int mKeyguardClockTopMargin = 0;
|
private int mKeyguardClockTopMargin = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -276,16 +275,15 @@ public class KeyguardClockSwitchController extends ViewController<KeyguardClockS
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void updateClockLayout() {
|
private void updateClockLayout() {
|
||||||
|
int largeClockTopMargin = 0;
|
||||||
if (mSmartspaceController.isEnabled()) {
|
if (mSmartspaceController.isEnabled()) {
|
||||||
|
largeClockTopMargin = getContext().getResources().getDimensionPixelSize(
|
||||||
|
R.dimen.keyguard_large_clock_top_margin);
|
||||||
|
}
|
||||||
RelativeLayout.LayoutParams lp = new RelativeLayout.LayoutParams(MATCH_PARENT,
|
RelativeLayout.LayoutParams lp = new RelativeLayout.LayoutParams(MATCH_PARENT,
|
||||||
MATCH_PARENT);
|
MATCH_PARENT);
|
||||||
mLargeClockTopMargin = getContext().getResources().getDimensionPixelSize(
|
lp.topMargin = largeClockTopMargin;
|
||||||
R.dimen.keyguard_large_clock_top_margin);
|
|
||||||
lp.topMargin = mLargeClockTopMargin;
|
|
||||||
mLargeClockFrame.setLayoutParams(lp);
|
mLargeClockFrame.setLayoutParams(lp);
|
||||||
} else {
|
|
||||||
mLargeClockTopMargin = 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user