Loading packages/SystemUI/res-keyguard/layout/keyguard_clock_switch.xml +1 −1 Original line number Diff line number Diff line Loading @@ -57,7 +57,7 @@ android:id="@+id/animatable_clock_view_large" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center_horizontal" android:layout_gravity="center" android:gravity="center_horizontal" android:textSize="@dimen/large_clock_text_size" android:fontFamily="@font/clock" Loading packages/SystemUI/res/values-h800dp/dimens.xml +3 −0 Original line number Diff line number Diff line Loading @@ -20,4 +20,7 @@ <!-- Large clock maximum font size (dp is intentional, to prevent any further scaling) --> <dimen name="large_clock_text_size">200dp</dimen> <!-- With the large clock, move up slightly from the center --> <dimen name="keyguard_large_clock_top_margin">-104dp</dimen> </resources> packages/SystemUI/res/values/dimens.xml +5 −1 Original line number Diff line number Diff line Loading @@ -208,7 +208,7 @@ <dimen name="keyguard_indication_y_translation">24dp</dimen> <!-- The padding on the bottom of the notifications on the keyguard --> <dimen name="keyguard_indication_bottom_padding">12sp</dimen> <dimen name="keyguard_indication_bottom_padding">16sp</dimen> <!-- The padding at start and end of indication text shown on AOD --> <dimen name="keyguard_indication_text_padding">16dp</dimen> Loading Loading @@ -743,6 +743,10 @@ <dimen name="keyguard_clock_lock_margin">16dp</dimen> <!-- The amount to shift the clocks during a small/large transition --> <dimen name="keyguard_clock_switch_y_shift">10dp</dimen> <!-- When large clock is showing, offset the smartspace by this amount --> <dimen name="keyguard_smartspace_top_offset">12dp</dimen> <!-- With the large clock, move up slightly from the center --> <dimen name="keyguard_large_clock_top_margin">-52dp</dimen> <!-- Default line spacing multiplier between hours and minutes of the keyguard clock --> <item name="keyguard_clock_line_spacing_scale" type="dimen" format="float">.7</item> Loading packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitch.java +5 −1 Original line number Diff line number Diff line Loading @@ -57,6 +57,7 @@ public class KeyguardClockSwitch extends RelativeLayout { private View mKeyguardStatusArea; /** Mutually exclusive with mKeyguardStatusArea */ private View mSmartspaceView; private int mSmartspaceTopOffset; /** * Maintain state so that a newly connected plugin can be initialized. Loading Loading @@ -96,6 +97,9 @@ public class KeyguardClockSwitch extends RelativeLayout { mClockSwitchYAmount = mContext.getResources().getDimensionPixelSize( R.dimen.keyguard_clock_switch_y_shift); mSmartspaceTopOffset = mContext.getResources().getDimensionPixelSize( R.dimen.keyguard_smartspace_top_offset); } /** Loading Loading @@ -193,7 +197,7 @@ public class KeyguardClockSwitch extends RelativeLayout { if (indexOfChild(in) == -1) addView(in); direction = -1; smartspaceYTranslation = mSmartspaceView == null ? 0 : mClockFrame.getTop() - mSmartspaceView.getTop(); : mClockFrame.getTop() - mSmartspaceView.getTop() + mSmartspaceTopOffset; } else { in = mClockFrame; out = mLargeClockFrame; Loading packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitchController.java +13 −4 Original line number Diff line number Diff line Loading @@ -189,10 +189,7 @@ public class KeyguardClockSwitchController extends ViewController<KeyguardClockS .getDimensionPixelSize(R.dimen.below_clock_padding_end); mSmartspaceView.setPaddingRelative(startPadding, 0, endPadding, 0); // ... but above the large clock lp = new RelativeLayout.LayoutParams(MATCH_PARENT, WRAP_CONTENT); lp.addRule(RelativeLayout.BELOW, mSmartspaceView.getId()); mLargeClockFrame.setLayoutParams(lp); updateClockLayout(); View nic = mView.findViewById( R.id.left_aligned_notification_icon_container); Loading Loading @@ -235,6 +232,18 @@ public class KeyguardClockSwitchController extends ViewController<KeyguardClockS */ public void onDensityOrFontScaleChanged() { mView.onDensityOrFontScaleChanged(); updateClockLayout(); } private void updateClockLayout() { if (mSmartspaceController.isEnabled()) { RelativeLayout.LayoutParams lp = new RelativeLayout.LayoutParams(MATCH_PARENT, MATCH_PARENT); lp.topMargin = getContext().getResources().getDimensionPixelSize( R.dimen.keyguard_large_clock_top_margin); mLargeClockFrame.setLayoutParams(lp); } } /** Loading Loading
packages/SystemUI/res-keyguard/layout/keyguard_clock_switch.xml +1 −1 Original line number Diff line number Diff line Loading @@ -57,7 +57,7 @@ android:id="@+id/animatable_clock_view_large" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center_horizontal" android:layout_gravity="center" android:gravity="center_horizontal" android:textSize="@dimen/large_clock_text_size" android:fontFamily="@font/clock" Loading
packages/SystemUI/res/values-h800dp/dimens.xml +3 −0 Original line number Diff line number Diff line Loading @@ -20,4 +20,7 @@ <!-- Large clock maximum font size (dp is intentional, to prevent any further scaling) --> <dimen name="large_clock_text_size">200dp</dimen> <!-- With the large clock, move up slightly from the center --> <dimen name="keyguard_large_clock_top_margin">-104dp</dimen> </resources>
packages/SystemUI/res/values/dimens.xml +5 −1 Original line number Diff line number Diff line Loading @@ -208,7 +208,7 @@ <dimen name="keyguard_indication_y_translation">24dp</dimen> <!-- The padding on the bottom of the notifications on the keyguard --> <dimen name="keyguard_indication_bottom_padding">12sp</dimen> <dimen name="keyguard_indication_bottom_padding">16sp</dimen> <!-- The padding at start and end of indication text shown on AOD --> <dimen name="keyguard_indication_text_padding">16dp</dimen> Loading Loading @@ -743,6 +743,10 @@ <dimen name="keyguard_clock_lock_margin">16dp</dimen> <!-- The amount to shift the clocks during a small/large transition --> <dimen name="keyguard_clock_switch_y_shift">10dp</dimen> <!-- When large clock is showing, offset the smartspace by this amount --> <dimen name="keyguard_smartspace_top_offset">12dp</dimen> <!-- With the large clock, move up slightly from the center --> <dimen name="keyguard_large_clock_top_margin">-52dp</dimen> <!-- Default line spacing multiplier between hours and minutes of the keyguard clock --> <item name="keyguard_clock_line_spacing_scale" type="dimen" format="float">.7</item> Loading
packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitch.java +5 −1 Original line number Diff line number Diff line Loading @@ -57,6 +57,7 @@ public class KeyguardClockSwitch extends RelativeLayout { private View mKeyguardStatusArea; /** Mutually exclusive with mKeyguardStatusArea */ private View mSmartspaceView; private int mSmartspaceTopOffset; /** * Maintain state so that a newly connected plugin can be initialized. Loading Loading @@ -96,6 +97,9 @@ public class KeyguardClockSwitch extends RelativeLayout { mClockSwitchYAmount = mContext.getResources().getDimensionPixelSize( R.dimen.keyguard_clock_switch_y_shift); mSmartspaceTopOffset = mContext.getResources().getDimensionPixelSize( R.dimen.keyguard_smartspace_top_offset); } /** Loading Loading @@ -193,7 +197,7 @@ public class KeyguardClockSwitch extends RelativeLayout { if (indexOfChild(in) == -1) addView(in); direction = -1; smartspaceYTranslation = mSmartspaceView == null ? 0 : mClockFrame.getTop() - mSmartspaceView.getTop(); : mClockFrame.getTop() - mSmartspaceView.getTop() + mSmartspaceTopOffset; } else { in = mClockFrame; out = mLargeClockFrame; Loading
packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitchController.java +13 −4 Original line number Diff line number Diff line Loading @@ -189,10 +189,7 @@ public class KeyguardClockSwitchController extends ViewController<KeyguardClockS .getDimensionPixelSize(R.dimen.below_clock_padding_end); mSmartspaceView.setPaddingRelative(startPadding, 0, endPadding, 0); // ... but above the large clock lp = new RelativeLayout.LayoutParams(MATCH_PARENT, WRAP_CONTENT); lp.addRule(RelativeLayout.BELOW, mSmartspaceView.getId()); mLargeClockFrame.setLayoutParams(lp); updateClockLayout(); View nic = mView.findViewById( R.id.left_aligned_notification_icon_container); Loading Loading @@ -235,6 +232,18 @@ public class KeyguardClockSwitchController extends ViewController<KeyguardClockS */ public void onDensityOrFontScaleChanged() { mView.onDensityOrFontScaleChanged(); updateClockLayout(); } private void updateClockLayout() { if (mSmartspaceController.isEnabled()) { RelativeLayout.LayoutParams lp = new RelativeLayout.LayoutParams(MATCH_PARENT, MATCH_PARENT); lp.topMargin = getContext().getResources().getDimensionPixelSize( R.dimen.keyguard_large_clock_top_margin); mLargeClockFrame.setLayoutParams(lp); } } /** Loading