1 <?xml version="1.0" encoding="utf-8"?> 2 <!-- Copyright (C) 2016 The Android Open Source Project 3 4 Licensed under the Apache License, Version 2.0 (the "License"); 5 you may not use this file except in compliance with the License. 6 You may obtain a copy of the License at 7 8 http://www.apache.org/licenses/LICENSE-2.0 9 10 Unless required by applicable law or agreed to in writing, software 11 distributed under the License is distributed on an "AS IS" BASIS, 12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 See the License for the specific language governing permissions and 14 limitations under the License. 15 --> 16 17 <!-- This TimerItem includes the circle because ample space exists. --> 18 <com.android.deskclock.timer.TimerItem 19 xmlns:android="http://schemas.android.com/apk/res/android" 20 xmlns:app="http://schemas.android.com/apk/res-auto" 21 android:layout_width="match_parent" 22 android:layout_height="match_parent" 23 android:orientation="vertical"> 24 25 <android.support.percent.PercentFrameLayout 26 android:layout_width="match_parent" 27 android:layout_height="0dp" 28 android:layout_weight="1"> 29 30 <com.android.deskclock.TimerCircleFrameLayout 31 android:layout_gravity="center" 32 app:layout_aspectRatio="100%" 33 app:layout_heightPercent="@fraction/timer_circle_height_percent" 34 app:layout_widthPercent="@fraction/timer_circle_width_percent"> 35 36 <com.android.deskclock.CircleButtonsLayout 37 android:layout_width="match_parent" 38 android:layout_height="match_parent"> 39 40 <com.android.deskclock.timer.TimerCircleView 41 android:id="@+id/timer_time" 42 android:layout_width="match_parent" 43 android:layout_height="match_parent" /> 44 45 <com.android.deskclock.widget.AutoSizingTextView 46 android:id="@+id/timer_time_text" 47 style="@style/display_time" 48 android:layout_width="match_parent" 49 android:layout_height="wrap_content" 50 android:layout_gravity="center" 51 android:gravity="center" 52 android:includeFontPadding="false" 53 android:paddingEnd="20dp" 54 android:paddingStart="20dp" 55 android:textSize="70sp" /> 56 57 <Button 58 android:id="@+id/timer_label" 59 style="?attr/borderlessButtonStyle" 60 android:layout_width="wrap_content" 61 android:layout_height="wrap_content" 62 android:layout_gravity="top|center_horizontal" 63 android:clickable="false" 64 android:ellipsize="end" 65 android:gravity="center" 66 android:hint="@string/label" 67 android:maxLines="1" 68 android:minHeight="@dimen/touch_target_min_size" 69 android:minWidth="@dimen/touch_target_min_size" 70 android:textAppearance="@style/SecondaryLabelTextAppearance" /> 71 72 <Button 73 android:id="@+id/reset_add" 74 style="?attr/borderlessButtonStyle" 75 android:layout_width="wrap_content" 76 android:layout_height="wrap_content" 77 android:layout_gravity="bottom|center_horizontal" 78 android:contentDescription="@string/timer_plus_one" 79 android:gravity="center" 80 android:scaleType="centerInside" /> 81 82 </com.android.deskclock.CircleButtonsLayout> 83 84 </com.android.deskclock.TimerCircleFrameLayout> 85 86 </android.support.percent.PercentFrameLayout> 87 88 <Space 89 android:layout_width="match_parent" 90 android:layout_height="@dimen/fab_height" /> 91 92 </com.android.deskclock.timer.TimerItem>