| <?xml version="1.0" encoding="utf-8"?> |
| <!-- |
| SPDX-FileCopyrightText: 2023 The LineageOS Project |
| SPDX-License-Identifier: Apache-2.0 |
| --> |
| |
| <!-- This TimerItem excludes the circle because not enough space exists. --> |
| <com.android.deskclock.timer.TimerItem |
| xmlns:android="http://schemas.android.com/apk/res/android" |
| xmlns:app="http://schemas.android.com/apk/res-auto" |
| xmlns:tools="http://schemas.android.com/tools" |
| android:layout_width="wrap_content" |
| android:layout_height="match_parent" |
| android:layout_marginStart="8dp" |
| android:layout_marginEnd="8dp" |
| android:layout_marginBottom="8dp" |
| android:background="@drawable/alarm_background" |
| android:padding="8dp"> |
| |
| <TextView |
| android:id="@+id/timer_label" |
| style="?attr/borderlessButtonStyle" |
| android:layout_width="0dp" |
| android:layout_height="wrap_content" |
| android:gravity="start" |
| android:ellipsize="end" |
| android:paddingStart="8dp" |
| android:paddingEnd="8dp" |
| android:layout_marginEnd="8dp" |
| android:hint="@string/label" |
| android:maxLines="1" |
| android:textAlignment="viewStart" |
| android:textAppearance="@style/TimerLabelTextAppearance" |
| app:layout_constraintStart_toStartOf="parent" |
| app:layout_constraintEnd_toStartOf="@id/close" |
| app:layout_constraintTop_toTopOf="parent" |
| tools:text="@string/label"/> |
| |
| <ImageButton |
| android:id="@+id/close" |
| android:layout_width="wrap_content" |
| android:layout_height="wrap_content" |
| android:minWidth="@dimen/touch_target_min_size" |
| android:minHeight="@dimen/touch_target_min_size" |
| android:src="@drawable/ic_close_circle" |
| android:scaleType="centerInside" |
| app:layout_constraintEnd_toEndOf="parent" |
| app:layout_constraintTop_toTopOf="parent" /> |
| |
| <androidx.constraintlayout.widget.ConstraintLayout |
| android:id="@+id/time_container" |
| android:layout_width="0dp" |
| android:layout_height="0dp" |
| android:orientation="vertical" |
| android:gravity="center_vertical|center_horizontal" |
| app:layout_constraintStart_toStartOf="parent" |
| app:layout_constraintEnd_toStartOf="@id/add_one_min" |
| app:layout_constraintTop_toBottomOf="@id/timer_label" |
| app:layout_constraintBottom_toBottomOf="parent" |
| app:layout_constraintWidth_min="150dp"> |
| |
| <com.android.deskclock.widget.AutoSizingTextView |
| android:id="@+id/timer_time_text" |
| style="@style/display_time" |
| android:layout_width="wrap_content" |
| android:layout_height="wrap_content" |
| android:layout_gravity="center" |
| android:includeFontPadding="false" |
| android:paddingStart="16dp" |
| android:paddingEnd="16dp" |
| android:textSize="40sp" |
| app:layout_constraintBottom_toBottomOf="parent" |
| app:layout_constraintEnd_toEndOf="parent" |
| app:layout_constraintStart_toStartOf="parent" |
| app:layout_constraintTop_toTopOf="parent" |
| tools:text="01:23" /> |
| |
| <ImageButton |
| android:id="@+id/reset" |
| android:layout_width="wrap_content" |
| android:layout_height="wrap_content" |
| android:layout_gravity="center_horizontal" |
| android:contentDescription="@string/timer_reset" |
| android:gravity="bottom" |
| android:minWidth="@dimen/touch_target_min_size" |
| android:minHeight="@dimen/touch_target_min_size" |
| android:scaleType="centerInside" |
| android:src="@drawable/ic_reset" |
| app:layout_constraintBottom_toBottomOf="parent" |
| app:layout_constraintEnd_toEndOf="parent" |
| app:layout_constraintStart_toStartOf="parent" |
| app:layout_constraintTop_toBottomOf="@+id/timer_time_text" |
| app:tint="@color/accent_color" /> |
| |
| </androidx.constraintlayout.widget.ConstraintLayout> |
| |
| <Space |
| android:id="@+id/space_after_close" |
| android:layout_width="0dp" |
| android:layout_height="8dp" |
| app:layout_constraintTop_toBottomOf="@id/close" |
| app:layout_constraintBottom_toTopOf="@id/add_one_min" |
| app:layout_constraintStart_toEndOf="@id/time_container" |
| app:layout_constraintEnd_toEndOf="@id/add_one_min"/> |
| |
| <Button |
| android:id="@+id/add_one_min" |
| android:layout_width="wrap_content" |
| android:layout_height="wrap_content" |
| android:contentDescription="@string/timer_plus_one" |
| android:maxLines="1" |
| android:padding="16dp" |
| android:text="@string/timer_add_minute" |
| android:background="@drawable/bg_material_button" |
| android:textSize="20sp" |
| android:fontFamily="sans-serif-medium" |
| app:layout_constraintEnd_toEndOf="parent" |
| app:layout_constraintBottom_toTopOf="@id/space_after_add_one_min"/> |
| |
| <Space |
| android:id="@+id/space_after_add_one_min" |
| android:layout_width="0dp" |
| android:layout_height="8dp" |
| app:layout_constraintBottom_toTopOf="@id/play_pause" |
| app:layout_constraintStart_toStartOf="@id/add_one_min" |
| app:layout_constraintEnd_toEndOf="@id/add_one_min"/> |
| |
| <ImageButton |
| android:id="@+id/play_pause" |
| android:layout_width="0dp" |
| android:layout_height="wrap_content" |
| android:contentDescription="@string/timer_start" |
| android:maxLines="1" |
| android:padding="16dp" |
| android:background="@drawable/bg_material_button" |
| android:backgroundTint="@color/accent_color2" |
| android:src="@drawable/ic_play_pause" |
| android:scaleType="centerInside" |
| app:layout_constraintStart_toStartOf="@id/add_one_min" |
| app:layout_constraintEnd_toEndOf="@id/add_one_min" |
| app:layout_constraintBottom_toBottomOf="parent" |
| app:tint="?android:textColorPrimaryInverse" /> |
| |
| </com.android.deskclock.timer.TimerItem> |