Loading packages/SystemUI/res-keyguard/values/dimens.xml +1 −0 Original line number Diff line number Diff line Loading @@ -53,6 +53,7 @@ <dimen name="widget_big_font_size">64dp</dimen> <!-- Clock with header --> <dimen name="widget_small_font_size">24dp</dimen> <dimen name="widget_small_font_stroke">0.6dp</dimen> <!-- Dash between clock and header --> <dimen name="widget_separator_width">12dp</dimen> <dimen name="widget_separator_thickness">1dp</dimen> Loading packages/SystemUI/src/com/android/keyguard/KeyguardStatusView.java +12 −0 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ import android.app.IActivityManager; import android.content.Context; import android.content.res.Resources; import android.graphics.Color; import android.graphics.Paint; import android.os.Handler; import android.os.Looper; import android.os.RemoteException; Loading Loading @@ -179,6 +180,8 @@ public class KeyguardStatusView extends GridLayout implements mVisibleInDoze = Sets.newArraySet(mClockView, mKeyguardSlice); mTextColor = mClockView.getCurrentTextColor(); int clockStroke = getResources().getDimensionPixelSize(R.dimen.widget_small_font_stroke); mClockView.getPaint().setStrokeWidth(clockStroke); mClockView.addOnLayoutChangeListener(this); mClockSeparator.addOnLayoutChangeListener(this); mKeyguardSlice.setContentChangeListener(this::onSliceContentChanged); Loading Loading @@ -227,6 +230,7 @@ public class KeyguardStatusView extends GridLayout implements if (view == mClockView) { float clockScale = smallClock ? mSmallClockScale : 1; Paint.Style style = smallClock ? Paint.Style.FILL_AND_STROKE : Paint.Style.FILL; if (mAnimateLayout) { mClockView.setY(oldTop + heightOffset); mClockView.animate().cancel(); Loading @@ -238,11 +242,17 @@ public class KeyguardStatusView extends GridLayout implements .y(top) .scaleX(clockScale) .scaleY(clockScale) .withEndAction(() -> { mClockView.getPaint().setStyle(style); mClockView.invalidate(); }) .start(); } else { mClockView.setY(top); mClockView.setScaleX(clockScale); mClockView.setScaleY(clockScale); mClockView.getPaint().setStyle(style); mClockView.invalidate(); } } else if (view == mClockSeparator) { boolean hasSeparator = hasHeader && !mPulsing; Loading Loading @@ -280,6 +290,8 @@ public class KeyguardStatusView extends GridLayout implements if (mClockView != null) { mClockView.setTextSize(TypedValue.COMPLEX_UNIT_PX, getResources().getDimensionPixelSize(R.dimen.widget_big_font_size)); mClockView.getPaint().setStrokeWidth( getResources().getDimensionPixelSize(R.dimen.widget_small_font_stroke)); } if (mOwnerInfo != null) { mOwnerInfo.setTextSize(TypedValue.COMPLEX_UNIT_PX, Loading Loading
packages/SystemUI/res-keyguard/values/dimens.xml +1 −0 Original line number Diff line number Diff line Loading @@ -53,6 +53,7 @@ <dimen name="widget_big_font_size">64dp</dimen> <!-- Clock with header --> <dimen name="widget_small_font_size">24dp</dimen> <dimen name="widget_small_font_stroke">0.6dp</dimen> <!-- Dash between clock and header --> <dimen name="widget_separator_width">12dp</dimen> <dimen name="widget_separator_thickness">1dp</dimen> Loading
packages/SystemUI/src/com/android/keyguard/KeyguardStatusView.java +12 −0 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ import android.app.IActivityManager; import android.content.Context; import android.content.res.Resources; import android.graphics.Color; import android.graphics.Paint; import android.os.Handler; import android.os.Looper; import android.os.RemoteException; Loading Loading @@ -179,6 +180,8 @@ public class KeyguardStatusView extends GridLayout implements mVisibleInDoze = Sets.newArraySet(mClockView, mKeyguardSlice); mTextColor = mClockView.getCurrentTextColor(); int clockStroke = getResources().getDimensionPixelSize(R.dimen.widget_small_font_stroke); mClockView.getPaint().setStrokeWidth(clockStroke); mClockView.addOnLayoutChangeListener(this); mClockSeparator.addOnLayoutChangeListener(this); mKeyguardSlice.setContentChangeListener(this::onSliceContentChanged); Loading Loading @@ -227,6 +230,7 @@ public class KeyguardStatusView extends GridLayout implements if (view == mClockView) { float clockScale = smallClock ? mSmallClockScale : 1; Paint.Style style = smallClock ? Paint.Style.FILL_AND_STROKE : Paint.Style.FILL; if (mAnimateLayout) { mClockView.setY(oldTop + heightOffset); mClockView.animate().cancel(); Loading @@ -238,11 +242,17 @@ public class KeyguardStatusView extends GridLayout implements .y(top) .scaleX(clockScale) .scaleY(clockScale) .withEndAction(() -> { mClockView.getPaint().setStyle(style); mClockView.invalidate(); }) .start(); } else { mClockView.setY(top); mClockView.setScaleX(clockScale); mClockView.setScaleY(clockScale); mClockView.getPaint().setStyle(style); mClockView.invalidate(); } } else if (view == mClockSeparator) { boolean hasSeparator = hasHeader && !mPulsing; Loading Loading @@ -280,6 +290,8 @@ public class KeyguardStatusView extends GridLayout implements if (mClockView != null) { mClockView.setTextSize(TypedValue.COMPLEX_UNIT_PX, getResources().getDimensionPixelSize(R.dimen.widget_big_font_size)); mClockView.getPaint().setStrokeWidth( getResources().getDimensionPixelSize(R.dimen.widget_small_font_stroke)); } if (mOwnerInfo != null) { mOwnerInfo.setTextSize(TypedValue.COMPLEX_UNIT_PX, Loading