summaryrefslogtreecommitdiff
path: root/app/src/main/res/layout/time_dialog.xml
blob: 50001bf9cd709145067c75467c3bb9015c2f7dbf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    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="vertical">

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            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>

        <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:layout_width="match_parent"
            android:layout_height="wrap_content"
            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
        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" />

        <CheckBox
            android:id="@+id/chAutoEnable"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:text="@string/auto_enable_label" />

    </LinearLayout>

</LinearLayout>