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

Commit dcf32d11 authored by Nick Ning's avatar Nick Ning
Browse files

Implement the native Dream Clock

Implement the native view of the clock for faster rendering with transparent background in the Complications Layer for the Dream Overlay per go/android-dream-clock design.

Bug: 207681440
Test: manual
Change-Id: I9d8a1476db0a8d9717d2ad794d285707d1abaa96
parent 7e3ef8e3
Loading
Loading
Loading
Loading
+50 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ Copyright (C) 2021 The Android Open Source Project
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~      http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
-->
<androidx.constraintlayout.widget.ConstraintLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:id="@+id/dream_overlay_complications_layer"
    android:padding="20dp"
    android:layout_width="match_parent"
    android:layout_height="match_parent">
    <TextClock
        android:id="@+id/time_view"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:fontFamily="sans-serif-thin"
        android:format12Hour="h:mm"
        android:format24Hour="kk:mm"
        android:shadowColor="#B2000000"
        android:shadowRadius="2.0"
        android:singleLine="true"
        android:textSize="72sp"
        app:layout_constraintBottom_toTopOf="@+id/date_view"
        app:layout_constraintStart_toStartOf="parent" />
    <TextClock
        android:id="@+id/date_view"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:shadowColor="#B2000000"
        android:shadowRadius="2.0"
        android:format12Hour="EEE, MMM d"
        android:format24Hour="EEE, MMM d"
        android:singleLine="true"
        android:textSize="18sp"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="@+id/time_view"
        app:layout_constraintStart_toStartOf="@+id/time_view" />
</androidx.constraintlayout.widget.ConstraintLayout>
 No newline at end of file
+2 −0
Original line number Diff line number Diff line
@@ -28,6 +28,8 @@
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintBottom_toBottomOf="parent" />

    <include layout="@layout/dream_overlay_complications_layer" />

    <com.android.systemui.dreams.DreamOverlayStatusBarView
        android:id="@+id/dream_overlay_status_bar"
        android:layout_width="match_parent"