| <?xml version="1.0" encoding="utf-8"?> |
| <!-- Copyright (C) 2015 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. |
| --> |
| |
| <!-- This TimerItem includes the circle because ample 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="match_parent" |
| android:layout_height="wrap_content" |
| android:layout_marginStart="8dp" |
| android:layout_marginEnd="8dp" |
| android:layout_marginBottom="8dp" |
| android:background="@drawable/alarm_background" |
| android:padding="16dp"> |
| |
| <include layout="@layout/centered_guidelines" /> |
| |
| <TextView |
| android:id="@+id/timer_label" |
| style="?attr/borderlessButtonStyle" |
| android:layout_width="0dp" |
| android:layout_height="wrap_content" |
| android:gravity="start|center" |
| android:ellipsize="start" |
| android:paddingStart="8dp" |
| android:paddingEnd="8dp" |
| android:layout_marginEnd="8dp" |
| android:hint="@string/label" |
| android:maxLines="1" |
| 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" |
| android:contentDescription="@string/timer_delete" /> |
| |
| <com.android.deskclock.CircleButtonsLayout |
| android:id="@+id/circle_container" |
| android:layout_width="0dp" |
| android:layout_height="0dp" |
| app:layout_constraintDimensionRatio="1:1" |
| app:layout_constraintHeight_max="@dimen/max_timer_circle_size" |
| 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"> |
| |
| <com.android.deskclock.timer.TimerCircleView |
| android:id="@+id/timer_time" |
| android:layout_width="match_parent" |
| android:layout_height="match_parent" /> |
| |
| <com.android.deskclock.widget.AutoSizingTextView |
| android:id="@+id/timer_time_text" |
| style="@style/display_time" |
| android:layout_width="match_parent" |
| android:layout_height="wrap_content" |
| android:layout_gravity="center" |
| android:gravity="center" |
| android:includeFontPadding="false" |
| android:paddingStart="24dp" |
| android:paddingEnd="24dp" |
| android:textSize="40sp" |
| android:importantForAccessibility="no" |
| tools:text="01:23"/> |
| |
| <ImageButton |
| android:id="@+id/reset" |
| android:layout_width="wrap_content" |
| android:layout_height="wrap_content" |
| android:layout_gravity="bottom|center_horizontal" |
| android:contentDescription="@string/timer_reset" |
| android:gravity="center" |
| android:scaleType="centerInside" |
| android:src="@drawable/ic_reset" |
| android:minWidth="@dimen/touch_target_min_size" |
| android:minHeight="@dimen/touch_target_min_size" |
| app:tint="@color/accent_color" /> |
| |
| </com.android.deskclock.CircleButtonsLayout> |
| |
| <Space |
| android:id="@+id/space_after_close" |
| android:layout_width="0dp" |
| android:layout_height="8dp" |
| android:padding="24dp" |
| app:layout_constraintTop_toBottomOf="@id/close" |
| app:layout_constraintBottom_toTopOf="@id/add_one_min" |
| app:layout_constraintStart_toEndOf="@id/circle_container" |
| app:layout_constraintEnd_toEndOf="@id/add_one_min"/> |
| |
| <Button |
| android:id="@+id/add_one_min" |
| android:layout_width="0dp" |
| android:layout_height="wrap_content" |
| android:contentDescription="@string/timer_plus_one" |
| android:maxLines="1" |
| android:padding="24dp" |
| 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_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="24dp" |
| 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> |