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

Commit 853a1cea authored by Chris Wren's avatar Chris Wren Committed by Android (Google) Code Review
Browse files

Merge "Copy date format style from keyguard." into jb-mr1-dev

parents 8091c8e9 5fb18aa5
Loading
Loading
Loading
Loading
+22 −13
Original line number Diff line number Diff line
@@ -26,6 +26,11 @@
    android:gravity="center_vertical"
    android:baselineAligned="false"
    >
    <LinearLayout
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:orientation="horizontal"
        >
        <com.android.systemui.statusbar.policy.Clock
            android:id="@+id/clock"
            android:layout_width="wrap_content"
@@ -33,6 +38,7 @@
            android:layout_marginLeft="8dp"
            android:singleLine="true"
            android:textAppearance="@style/TextAppearance.StatusBar.Expanded.Clock"
            android:gravity="bottom"
            />

        <com.android.systemui.statusbar.policy.DateView android:id="@+id/date"
@@ -40,8 +46,11 @@
            android:layout_height="wrap_content"
            android:layout_marginLeft="8dp"
            android:layout_marginRight="8dp"
            android:singleLine="true"
            android:textAppearance="@style/TextAppearance.StatusBar.Expanded.Date"
            android:gravity="bottom"
            />
    </LinearLayout>

    <Space
        android:layout_width="0dp"
+2 −5
Original line number Diff line number Diff line
@@ -17,10 +17,7 @@
 */
-->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
    <!-- For formatting day of week and date in DateView.  %1$s is DOW, %2$s is date.
         We show both (DOW on one line, then the date) but this can be overridden for locales as
         necessary.
         -->
    <string name="status_bar_date_formatter">%1$s\n%2$s</string>
    <!-- Date format for display: should match the lockscreen in /policy.  -->
    <string name="abbrev_wday_month_day_no_year">@*android:string/abbrev_wday_month_day_no_year</string>

</resources>
+2 −5
Original line number Diff line number Diff line
@@ -87,11 +87,8 @@ public class DateView extends TextView {
    }

    protected void updateClock() {
        final Context context = getContext();
        Date now = new Date();
        CharSequence dow = DateFormat.format("EEEE", now);
        CharSequence date = DateFormat.getLongDateFormat(context).format(now);
        setText(context.getString(R.string.status_bar_date_formatter, dow, date));
        final String dateFormat = getContext().getString(R.string.abbrev_wday_month_day_no_year);
        setText(DateFormat.format(dateFormat, new Date()));
    }

    private boolean isVisible() {