Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 81affc1f authored by Beverly's avatar Beverly
Browse files

Update LS/AOD clock

- Center hours, only show one digit for hours if starts with 0.
- Decrease vertical spacing
- Remove horizontal letterSpacing adjustment (will be taken care within
the font file)
- Update color to use textColorPrimary

Test: manual
Bug: 170228350
Change-Id: I66d990eef8579ff56876ff12e1398198e515ec41
parent c31ec3d5
Loading
Loading
Loading
Loading
+4 −6
Original line number Diff line number Diff line
@@ -51,7 +51,6 @@
             android:layout_height="wrap_content"
             android:layout_gravity="bottom|center_horizontal"
             android:gravity="center_horizontal"
             android:letterSpacing="0.03"
             android:textColor="?attr/wallpaperTextColor"
             android:singleLine="true"
             style="@style/widget_title_bold"
@@ -72,12 +71,12 @@
            android:id="@+id/animatable_clock_view"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:gravity="right"
            android:layout_gravity="center_horizontal"
            android:gravity="center_horizontal"
            android:textSize="100dp"
            android:letterSpacing="0.02"
            android:lineSpacingMultiplier=".8"
            android:includeFontPadding="false"
            android:fontFamily="@font/clock"
            android:lineSpacingMultiplier=".65"
            android:typeface="monospace"
            android:elegantTextHeight="false"
            dozeWeight="200"
@@ -97,9 +96,8 @@
            android:layout_gravity="center_horizontal"
            android:gravity="center_horizontal"
            android:textSize="@dimen/large_clock_text_size"
            android:letterSpacing="0.02"
            android:lineSpacingMultiplier=".8"
            android:includeFontPadding="false"
            android:lineSpacingMultiplier=".65"
            android:fontFamily="@font/clock"
            android:typeface="monospace"
            android:elegantTextHeight="false"
+3 −4
Original line number Diff line number Diff line
@@ -85,10 +85,9 @@ public class AnimatableClockController extends ViewController<AnimatableClockVie
    }

    private void initColors() {
        mLockScreenColors[0] = Utils.getColorAttrDefaultColor(getContext(),
                com.android.systemui.R.attr.wallpaperTextColor);
        mLockScreenColors[1] = Utils.getColorAttrDefaultColor(getContext(),
                        com.android.systemui.R.attr.wallpaperTextColorSecondary);
        mLockScreenColors[0] = Utils.getColorAttr(getContext(),
                android.R.attr.textColorPrimary).getDefaultColor();
        mLockScreenColors[1] = mLockScreenColors[0]; // same color
        mView.setColors(mDozingColors, mLockScreenColors);
        mView.animateDoze(mIsDozing, false);
    }
+1 −1
Original line number Diff line number Diff line
@@ -38,7 +38,7 @@ import kotlin.Unit;
 * The time's text color is a gradient that changes its colors based on its controller.
 */
public class AnimatableClockView extends TextView {
    private static final CharSequence FORMAT_12_HOUR = "hh\nmm";
    private static final CharSequence FORMAT_12_HOUR = "h\nmm";
    private static final CharSequence FORMAT_24_HOUR = "HH\nmm";
    private static final long ANIM_DURATION = 300;