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

Commit ac7b9033 authored by Robert Snoeberger's avatar Robert Snoeberger
Browse files

Update digital clock based on latest mocks.

Bug: 122301289
Test: visual inspection of digital clock
Change-Id: I43583b6948adb6d65762c5e28cf87018d098706c
parent fc6e5674
Loading
Loading
Loading
Loading
+14 −2
Original line number Diff line number Diff line
@@ -19,9 +19,21 @@
    android:layout_width="match_parent"
    android:layout_height="match_parent"
  >
  <include
  <TextClock
      android:id="@+id/digital_clock"
      layout="@layout/text_clock"
      android:layout_marginLeft="20dp"
      android:layout_marginTop="72dp"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_gravity="top|left"
      android:textSize="44dp"
      android:letterSpacing="0.05"
      android:textColor="?attr/wallpaperTextColor"
      android:singleLine="true"
      style="@style/widget_big"
      android:format12Hour="@string/keyguard_widget_12_hours_format"
      android:format24Hour="@string/keyguard_widget_24_hours_format"
      android:elegantTextHeight="false"
  />
  <com.android.keyguard.clock.ImageClock
      android:id="@+id/analog_clock"
+14 −2
Original line number Diff line number Diff line
@@ -19,9 +19,21 @@
    android:layout_width="match_parent"
    android:layout_height="match_parent"
  >
  <include
  <TextClock
      android:id="@+id/digital_clock"
      layout="@layout/text_clock"
      android:layout_marginLeft="20dp"
      android:layout_marginTop="72dp"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_gravity="top|left"
      android:textSize="44dp"
      android:letterSpacing="0.05"
      android:textColor="?attr/wallpaperTextColor"
      android:singleLine="true"
      style="@style/widget_big"
      android:format12Hour="@string/keyguard_widget_12_hours_format"
      android:format24Hour="@string/keyguard_widget_24_hours_format"
      android:elegantTextHeight="false"
  />
  <com.android.keyguard.clock.StretchAnalogClock
      android:id="@+id/analog_clock"
+4 −2
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@ import android.content.res.Resources;
import android.util.AttributeSet;
import android.view.View;
import android.widget.FrameLayout;
import android.widget.FrameLayout.LayoutParams;

import com.android.keyguard.R;

@@ -80,8 +81,9 @@ public class ClockLayout extends FrameLayout {

        // Put digital clock in two left corner of the screen.
        if (mDigitalClock != null) {
            mDigitalClock.setX(0.1f * getWidth() + offsetX);
            mDigitalClock.setY(0.1f * getHeight() + offsetY);
            LayoutParams params = (LayoutParams) mDigitalClock.getLayoutParams();
            mDigitalClock.setX(offsetX + params.leftMargin);
            mDigitalClock.setY(offsetY + params.topMargin);
        }

        // Put the analog clock in the middle of the screen.