diff options
Diffstat (limited to 'app/src/main')
-rw-r--r-- | app/src/main/res/layout/time_dialog.xml | 246 |
1 files changed, 126 insertions, 120 deletions
diff --git a/app/src/main/res/layout/time_dialog.xml b/app/src/main/res/layout/time_dialog.xml index 263ac0c9c..2b5ae0985 100644 --- a/app/src/main/res/layout/time_dialog.xml +++ b/app/src/main/res/layout/time_dialog.xml @@ -1,164 +1,170 @@ <?xml version="1.0" encoding="utf-8"?> -<LinearLayout +<ScrollView xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" - android:layout_height="wrap_content" - android:orientation="vertical" - android:gravity="center" - android:padding="16dp"> + android:layout_height="wrap_content"> <LinearLayout - android:id="@+id/timeSetup" android:layout_width="match_parent" android:layout_height="wrap_content" - android:orientation="vertical"> + android:orientation="vertical" + android:gravity="center" + android:padding="16dp"> <LinearLayout + android:id="@+id/timeSetup" android:layout_width="match_parent" android:layout_height="wrap_content" - android:orientation="horizontal"> + android:orientation="vertical"> - <EditText - android:id="@+id/etxtTime" - android:layout_width="0dp" + <LinearLayout + android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_weight="1" - android:selectAllOnFocus="true" - android:layout_margin="8dp" - android:ems="2" - android:inputType="number" - android:maxLength="3" /> + android:orientation="horizontal"> + + <EditText + android:id="@+id/etxtTime" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_weight="1" + android:selectAllOnFocus="true" + android:layout_margin="8dp" + android:ems="2" + android:inputType="number" + android:maxLength="3" /> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/time_minutes" + android:layout_marginBottom="8dp" + android:layout_marginTop="8dp" /> + + </LinearLayout> - <TextView - android:layout_width="wrap_content" + <Button + android:id="@+id/setSleeptimerButton" + android:layout_width="match_parent" android:layout_height="wrap_content" - android:text="@string/time_minutes" - android:layout_marginBottom="8dp" - android:layout_marginTop="8dp" /> + android:text="@string/set_sleeptimer_label" /> </LinearLayout> - <Button - android:id="@+id/setSleeptimerButton" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:text="@string/set_sleeptimer_label" /> - - </LinearLayout> - - <LinearLayout - android:id="@+id/timeDisplay" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:orientation="vertical" - android:visibility="visible"> - - <TextView - android:id="@+id/time" - android:layout_width="match_parent" - android:layout_height="match_parent" - android:text="00:00:00" - android:layout_gravity="center" - android:gravity="center" - android:textSize="32sp" - android:textColor="?android:attr/textColorPrimary" /> - - <Button - android:id="@+id/disableSleeptimerButton" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:text="@string/disable_sleeptimer_label" /> - <LinearLayout + android:id="@+id/timeDisplay" android:layout_width="match_parent" android:layout_height="wrap_content" - android:orientation="horizontal" - android:gravity="center_vertical"> + android:orientation="vertical" + android:visibility="visible"> - <Button - android:id="@+id/extendSleepFiveMinutesButton" - android:layout_width="0dp" - android:layout_height="wrap_content" - android:layout_marginEnd="4dp" - android:layout_marginRight="4dp" - android:paddingHorizontal="2dp" - android:paddingVertical="4dp" - android:layout_weight="1" - style="?attr/materialButtonOutlinedStyle" - tools:text="+5 min" /> + <TextView + android:id="@+id/time" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:text="00:00:00" + android:layout_gravity="center" + android:gravity="center" + android:textSize="32sp" + android:textColor="?android:attr/textColorPrimary" /> <Button - android:id="@+id/extendSleepTenMinutesButton" - android:layout_width="0dp" + android:id="@+id/disableSleeptimerButton" + android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_marginStart="4dp" - android:layout_marginEnd="4dp" - android:paddingHorizontal="2dp" - android:paddingVertical="4dp" - android:layout_weight="1" - style="?attr/materialButtonOutlinedStyle" - tools:text="+10 min" /> + android:text="@string/disable_sleeptimer_label" /> - <Button - android:id="@+id/extendSleepTwentyMinutesButton" - android:layout_width="0dp" + <LinearLayout + android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_marginStart="4dp" - android:layout_marginRight="4dp" - android:layout_marginLeft="4dp" - android:paddingHorizontal="2dp" - android:paddingVertical="4dp" - android:layout_weight="1" - style="?attr/materialButtonOutlinedStyle" - tools:text="+20 min" /> + android:orientation="horizontal" + android:gravity="center_vertical"> + + <Button + android:id="@+id/extendSleepFiveMinutesButton" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_marginEnd="4dp" + android:layout_marginRight="4dp" + android:paddingHorizontal="2dp" + android:paddingVertical="4dp" + android:layout_weight="1" + style="?attr/materialButtonOutlinedStyle" + tools:text="+5 min" /> + + <Button + android:id="@+id/extendSleepTenMinutesButton" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_marginStart="4dp" + android:layout_marginEnd="4dp" + android:paddingHorizontal="2dp" + android:paddingVertical="4dp" + android:layout_weight="1" + style="?attr/materialButtonOutlinedStyle" + tools:text="+10 min" /> + + <Button + android:id="@+id/extendSleepTwentyMinutesButton" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_marginStart="4dp" + android:layout_marginRight="4dp" + android:layout_marginLeft="4dp" + android:paddingHorizontal="2dp" + android:paddingVertical="4dp" + android:layout_weight="1" + style="?attr/materialButtonOutlinedStyle" + tools:text="+20 min" /> + + </LinearLayout> </LinearLayout> - </LinearLayout> - - <LinearLayout - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:orientation="vertical" - android:layout_marginTop="8dp"> - - <CheckBox - android:id="@+id/cbShakeToReset" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:text="@string/shake_to_reset_label" /> - - <CheckBox - android:id="@+id/cbVibrate" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:text="@string/timer_vibration_label" /> - <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" - android:orientation="horizontal" - android:weightSum="1"> + android:orientation="vertical" + android:layout_marginTop="8dp"> <CheckBox - android:id="@+id/chAutoEnable" - android:layout_width="0dp" + android:id="@+id/cbShakeToReset" + android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_weight="1" - android:text="@string/auto_enable_label" /> + android:text="@string/shake_to_reset_label" /> - <ImageView - android:id="@+id/changeTimesButton" - android:layout_width="wrap_content" - android:layout_height="match_parent" - android:contentDescription="@string/auto_enable_change_times" - android:background="?attr/selectableItemBackgroundBorderless" - app:srcCompat="@drawable/ic_settings" /> + <CheckBox + android:id="@+id/cbVibrate" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:text="@string/timer_vibration_label" /> + + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="horizontal" + android:weightSum="1"> + + <CheckBox + android:id="@+id/chAutoEnable" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_weight="1" + android:text="@string/auto_enable_label" /> + + <ImageView + android:id="@+id/changeTimesButton" + android:layout_width="wrap_content" + android:layout_height="match_parent" + android:contentDescription="@string/auto_enable_change_times" + android:background="?attr/selectableItemBackgroundBorderless" + app:srcCompat="@drawable/ic_settings" /> + + </LinearLayout> </LinearLayout> </LinearLayout> -</LinearLayout> +</ScrollView> |