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

Commit 265df0dc authored by Isaac Katzenelson's avatar Isaac Katzenelson
Browse files

Latest layouts for clock widget

Bug: 10784680
Change-Id: I145d17f5963826472ed55b347e1599054c14f9c0
parent da063371
Loading
Loading
Loading
Loading
+11 −31
Original line number Diff line number Diff line
@@ -24,39 +24,19 @@
    android:background="?android:attr/selectableItemBackground"
    >

    <LinearLayout
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:baselineAligned="true"
        android:layoutDirection="ltr"
        android:layout_marginBottom="@dimen/bottom_text_spacing_digital"
        android:layout_gravity="center_horizontal|top">

    <TextClock
            android:id="@+id/the_clock1"
            android:format12Hour="@string/widget_12_hours_format_h"
            android:format24Hour="@string/widget_24_hours_format_h"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:paddingRight="@dimen/widget_big_time_margin_right"
            android:paddingEnd="@dimen/widget_big_time_margin_right"
            android:singleLine="true"
            style="@style/widget_big_thin"
            android:textColor="@color/clock_white"
            android:layout_gravity="center_horizontal|top"
             />
        <TextClock
            android:id="@+id/the_clock2"
            android:format12Hour="@string/widget_12_hours_format_no_ampm_m"
            android:format24Hour="@string/widget_24_hours_format_m"
        android:id="@+id/the_clock"
        android:format12Hour="@string/widget_12_hours_format"
        android:format24Hour="@string/widget_24_hours_format"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:singleLine="true"
        style="@style/widget_big_thin"
        android:textColor="@color/clock_white"
        android:layout_gravity="center_horizontal|top"
        android:baselineAligned="true"
        android:layout_marginBottom="@dimen/bottom_text_spacing_digital"
    />
    </LinearLayout>
    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
@@ -67,7 +47,7 @@
            android:textColor="@color/clock_white"
            android:format12Hour="@string/abbrev_wday_month_day_no_year"
            android:format24Hour="@string/abbrev_wday_month_day_no_year"
            style="@style/label"
            style="@style/widget_label"
            android:gravity="center"
            />
        <TextView android:id="@+id/nextAlarm"
@@ -77,7 +57,7 @@
            android:drawableLeft="@drawable/ic_alarm_small"
            android:drawableStart="@drawable/ic_alarm_small"
            android:textColor="@color/clock_gray"
            style="@style/label"
            style="@style/widget_label"
            android:layout_marginLeft="8dip"
            android:layout_marginStart="8dip"
            android:gravity="center"
+23 −65
Original line number Diff line number Diff line
@@ -19,7 +19,7 @@
    android:id="@+id/widget_item"
    android:orientation="vertical" >

    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal" >
@@ -30,38 +30,17 @@
            android:layout_weight="1"
            android:orientation="vertical" >

            <LinearLayout
                android:baselineAligned="true"
                android:layout_gravity="center"
                android:layoutDirection="ltr"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content">

            <TextClock
                    android:id="@+id/leftClock1"
                    android:format12Hour="@string/widget_12_hours_format_h"
                    android:format24Hour="@string/widget_24_hours_format_h"
                android:id="@+id/left_clock"
                android:format12Hour="@string/widget_12_hours_format_with_ampm"
                android:format24Hour="@string/widget_24_hours_format"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                    android:paddingRight="@dimen/widget_medium_time_margin_right"
                    android:paddingEnd="@dimen/widget_medium_time_margin_right"
                style="@style/widget_medium_thin"
                android:textColor="@color/clock_white"
                    android:textDirection="ltr"
                    android:layout_gravity="center"
                    android:gravity="center" />
                <TextClock
                    android:id="@+id/leftClock2"
                    android:format12Hour="@string/widget_12_hours_format_m"
                    android:format24Hour="@string/widget_24_hours_format_m"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    style="@style/widget_medium_thin"
                    android:textColor="@color/clock_white"
                    android:textDirection="ltr"
                android:baselineAligned="true"
                android:layout_gravity="center"
                android:gravity="center" />
            </LinearLayout>
            <LinearLayout
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
@@ -70,7 +49,7 @@

                <TextView
                    android:id="@+id/city_name_left"
                    style="@style/label"
                    style="@style/widget_label"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:ellipsize="end"
@@ -79,7 +58,7 @@

                <TextView
                    android:id="@+id/city_day_left"
                    style="@style/label"
                    style="@style/widget_label"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginLeft="@dimen/style_label_space"
@@ -96,38 +75,17 @@
            android:layout_weight="1"
            android:orientation="vertical" >

            <LinearLayout
                android:baselineAligned="true"
                android:layout_gravity="center"
                android:layoutDirection="ltr"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content">

            <TextClock
                    android:id="@+id/rightClock1"
                    android:format12Hour="@string/widget_12_hours_format_h"
                    android:format24Hour="@string/widget_24_hours_format_h"
                android:id="@+id/right_clock"
                android:format12Hour="@string/widget_12_hours_format_with_ampm"
                android:format24Hour="@string/widget_24_hours_format"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                    android:paddingRight="@dimen/widget_medium_time_margin_right"
                    android:paddingEnd="@dimen/widget_medium_time_margin_right"
                style="@style/widget_medium_thin"
                android:textColor="@color/clock_white"
                    android:textDirection="ltr"
                    android:layout_gravity="center"
                    android:gravity="center" />
                <TextClock
                    android:id="@+id/rightClock2"
                    android:format12Hour="@string/widget_12_hours_format_m"
                    android:format24Hour="@string/widget_24_hours_format_m"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    style="@style/widget_medium_thin"
                    android:textColor="@color/clock_white"
                    android:textDirection="ltr"
                android:baselineAligned="true"
                android:layout_gravity="center"
                android:gravity="center" />
            </LinearLayout>

            <LinearLayout
                android:layout_width="wrap_content"
@@ -137,7 +95,7 @@

                <TextView
                    android:id="@+id/city_name_right"
                    style="@style/label"
                    style="@style/widget_label"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:ellipsize="end"
@@ -146,7 +104,7 @@

                <TextView
                    android:id="@+id/city_day_right"
                    style="@style/label"
                    style="@style/widget_label"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginLeft="@dimen/style_label_space"
+1 −0
Original line number Diff line number Diff line
@@ -81,6 +81,7 @@
    <dimen name="small_font_size">48sp</dimen>
    <dimen name="medium_font_size">60dp</dimen>
    <dimen name="label_font_size">14sp</dimen>
    <dimen name="widget_label_font_size">12sp</dimen>
    <dimen name="main_ampm_font_size">18sp</dimen>
    <dimen name="header_font_size">24sp</dimen>
    <dimen name="body_font_size">18sp</dimen>
+3 −5
Original line number Diff line number Diff line
@@ -797,11 +797,9 @@
    <string name="digital_gadget">Digital clock</string>

    <!-- format strings for widget clock -->
    <string name="widget_12_hours_format_h" translatable="false">h</string>
    <string name="widget_12_hours_format_no_ampm_m" translatable="false">mm</string>
    <string name="widget_12_hours_format_m" translatable="false">mm&#160;<b><font size="15">a</font></b></string>
    <string name="widget_24_hours_format_h" translatable="false">kk</string>
    <string name="widget_24_hours_format_m" translatable="false">mm</string>
    <string name="widget_12_hours_format" translatable="false">h&#58;mm</string>
    <string name="widget_24_hours_format" translatable="false">kk&#58;mm</string>
    <string name="widget_12_hours_format_with_ampm" translatable="false">h&#58;mm&#160;<b><font size="15">a</font></b></string>

    <!-- String for no alarms -->
    <string name="no_alarms">No Alarms</string>
+4 −0
Original line number Diff line number Diff line
@@ -188,6 +188,10 @@
        <item name="android:textAllCaps">false</item>
    </style>

    <style name="widget_label" parent="label">
        <item name="android:textSize">@dimen/widget_label_font_size</item>
    </style>

    <style name="header">
        <item name="android:textSize">@dimen/header_font_size</item>
        <item name="android:textAllCaps">true</item>
Loading