Loading packages/SystemUI/res-keyguard/layout/keyguard_clock_switch.xml +1 −3 Original line number Diff line number Diff line Loading @@ -67,20 +67,18 @@ android:layout_height="wrap_content" android:layout_alignParentEnd="true" android:layout_alignParentTop="true" android:layout_marginBottom="24dp" android:visibility="gone"> <com.android.keyguard.AnimatableClockView android:id="@+id/animatable_clock_view" android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="right" android:textSize="80dp" android:letterSpacing="0.02" android:lineSpacingMultiplier=".8" android:includeFontPadding="false" android:fontFamily="@font/clock" android:typeface="monospace" android:format12Hour="hh\nmm" android:format24Hour="HH\nmm" android:elegantTextHeight="false" /> </FrameLayout> Loading packages/SystemUI/src/com/android/keyguard/AnimatableClockController.java +7 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,8 @@ package com.android.keyguard; import android.graphics.Color; import android.graphics.Paint; import android.util.MathUtils; import com.android.settingslib.Utils; import com.android.systemui.plugins.statusbar.StatusBarStateController; Loading Loading @@ -54,6 +56,11 @@ public class AnimatableClockController extends ViewController<AnimatableClockVie mStatusBarStateController.removeCallback(mStatusBarStateListener); } float getClockTextTopPadding() { Paint.FontMetrics fm = mView.getPaint().getFontMetrics(); return MathUtils.abs(fm.ascent - fm.top); } /** * Updates the time for this view. */ Loading packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitch.java +5 −0 Original line number Diff line number Diff line Loading @@ -232,6 +232,11 @@ public class KeyguardClockSwitch extends RelativeLayout { } } float getClockTextTopPadding() { Paint.FontMetrics fm = mClockView.getPaint().getFontMetrics(); return fm.ascent - fm.top; } /** * Set container for big clock face appearing behind NSSL and KeyguardStatusView. */ Loading packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitchController.java +9 −0 Original line number Diff line number Diff line Loading @@ -239,6 +239,15 @@ public class KeyguardClockSwitchController extends ViewController<KeyguardClockS mView.setFormat24Hour(Patterns.sClockView24); } float getClockTextTopPadding() { if (mLockScreenMode == KeyguardUpdateMonitor.LOCK_SCREEN_MODE_LAYOUT_1 && mNewLockScreenClockViewController != null) { return mNewLockScreenClockViewController.getClockTextTopPadding(); } return mView.getClockTextTopPadding(); } private void updateAodIcons() { NotificationIconContainer nic = (NotificationIconContainer) mView.findViewById( Loading packages/SystemUI/src/com/android/keyguard/KeyguardSliceView.java +3 −8 Original line number Diff line number Diff line Loading @@ -154,12 +154,7 @@ public class KeyguardSliceView extends LinearLayout { public void updateLockScreenMode(int mode) { mLockScreenMode = mode; if (mLockScreenMode == KeyguardUpdateMonitor.LOCK_SCREEN_MODE_LAYOUT_1) { // add top padding to better align with top of clock final int topPadding = (int) TypedValue.applyDimension( TypedValue.COMPLEX_UNIT_DIP, 20, getResources().getDisplayMetrics()); mTitle.setPaddingRelative(0, topPadding, 0, 0); mTitle.setPaddingRelative(0, 0, 0, 0); mTitle.setGravity(Gravity.START); setGravity(Gravity.START); RelativeLayout.LayoutParams lp = (RelativeLayout.LayoutParams) getLayoutParams(); Loading Loading @@ -524,9 +519,9 @@ public class KeyguardSliceView extends LinearLayout { .getDimension(R.dimen.widget_horizontal_padding) / 2; if (mLockScreenMode == KeyguardUpdateMonitor.LOCK_SCREEN_MODE_LAYOUT_1) { // orientation is vertical, so add padding to top & bottom setPadding(0, padding, 0, padding * (hasText ? 1 : -1)); setPadding(0, padding, 0, hasText ? padding : 0); } else { // oreintation is horizontal, so add padding to left & right // orientation is horizontal, so add padding to left & right setPadding(padding, 0, padding * (hasText ? 1 : -1), 0); } Loading Loading
packages/SystemUI/res-keyguard/layout/keyguard_clock_switch.xml +1 −3 Original line number Diff line number Diff line Loading @@ -67,20 +67,18 @@ android:layout_height="wrap_content" android:layout_alignParentEnd="true" android:layout_alignParentTop="true" android:layout_marginBottom="24dp" android:visibility="gone"> <com.android.keyguard.AnimatableClockView android:id="@+id/animatable_clock_view" android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="right" android:textSize="80dp" android:letterSpacing="0.02" android:lineSpacingMultiplier=".8" android:includeFontPadding="false" android:fontFamily="@font/clock" android:typeface="monospace" android:format12Hour="hh\nmm" android:format24Hour="HH\nmm" android:elegantTextHeight="false" /> </FrameLayout> Loading
packages/SystemUI/src/com/android/keyguard/AnimatableClockController.java +7 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,8 @@ package com.android.keyguard; import android.graphics.Color; import android.graphics.Paint; import android.util.MathUtils; import com.android.settingslib.Utils; import com.android.systemui.plugins.statusbar.StatusBarStateController; Loading Loading @@ -54,6 +56,11 @@ public class AnimatableClockController extends ViewController<AnimatableClockVie mStatusBarStateController.removeCallback(mStatusBarStateListener); } float getClockTextTopPadding() { Paint.FontMetrics fm = mView.getPaint().getFontMetrics(); return MathUtils.abs(fm.ascent - fm.top); } /** * Updates the time for this view. */ Loading
packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitch.java +5 −0 Original line number Diff line number Diff line Loading @@ -232,6 +232,11 @@ public class KeyguardClockSwitch extends RelativeLayout { } } float getClockTextTopPadding() { Paint.FontMetrics fm = mClockView.getPaint().getFontMetrics(); return fm.ascent - fm.top; } /** * Set container for big clock face appearing behind NSSL and KeyguardStatusView. */ Loading
packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitchController.java +9 −0 Original line number Diff line number Diff line Loading @@ -239,6 +239,15 @@ public class KeyguardClockSwitchController extends ViewController<KeyguardClockS mView.setFormat24Hour(Patterns.sClockView24); } float getClockTextTopPadding() { if (mLockScreenMode == KeyguardUpdateMonitor.LOCK_SCREEN_MODE_LAYOUT_1 && mNewLockScreenClockViewController != null) { return mNewLockScreenClockViewController.getClockTextTopPadding(); } return mView.getClockTextTopPadding(); } private void updateAodIcons() { NotificationIconContainer nic = (NotificationIconContainer) mView.findViewById( Loading
packages/SystemUI/src/com/android/keyguard/KeyguardSliceView.java +3 −8 Original line number Diff line number Diff line Loading @@ -154,12 +154,7 @@ public class KeyguardSliceView extends LinearLayout { public void updateLockScreenMode(int mode) { mLockScreenMode = mode; if (mLockScreenMode == KeyguardUpdateMonitor.LOCK_SCREEN_MODE_LAYOUT_1) { // add top padding to better align with top of clock final int topPadding = (int) TypedValue.applyDimension( TypedValue.COMPLEX_UNIT_DIP, 20, getResources().getDisplayMetrics()); mTitle.setPaddingRelative(0, topPadding, 0, 0); mTitle.setPaddingRelative(0, 0, 0, 0); mTitle.setGravity(Gravity.START); setGravity(Gravity.START); RelativeLayout.LayoutParams lp = (RelativeLayout.LayoutParams) getLayoutParams(); Loading Loading @@ -524,9 +519,9 @@ public class KeyguardSliceView extends LinearLayout { .getDimension(R.dimen.widget_horizontal_padding) / 2; if (mLockScreenMode == KeyguardUpdateMonitor.LOCK_SCREEN_MODE_LAYOUT_1) { // orientation is vertical, so add padding to top & bottom setPadding(0, padding, 0, padding * (hasText ? 1 : -1)); setPadding(0, padding, 0, hasText ? padding : 0); } else { // oreintation is horizontal, so add padding to left & right // orientation is horizontal, so add padding to left & right setPadding(padding, 0, padding * (hasText ? 1 : -1), 0); } Loading