Skip to content

Commit ea3e0a7

Browse files
committed
feat(reminders): AddEditReminderDialog XML
GSoC 2025: Review Reminders - XML file for AddEditReminderDialog. Allows time and deck modification. Also has a dropdown for advanced settings, including minimum card trigger threshold (with more advanced settings hopefully coming soon). The advanced settings will be grouped under a dropdown to prevent them from overwhelming users when the dialog initially opens.
1 parent d12b6ec commit ea3e0a7

File tree

1 file changed

+188
-0
lines changed

1 file changed

+188
-0
lines changed
Lines changed: 188 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,188 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<androidx.coordinatorlayout.widget.CoordinatorLayout
3+
xmlns:android="http://schemas.android.com/apk/res/android"
4+
xmlns:app="http://schemas.android.com/apk/res-auto"
5+
xmlns:tools="http://schemas.android.com/tools"
6+
android:id="@+id/root_layout"
7+
android:layout_width="match_parent"
8+
android:layout_height="match_parent">
9+
10+
<LinearLayout
11+
android:id="@+id/root_linear_layout"
12+
android:orientation="vertical"
13+
android:layout_width="match_parent"
14+
android:layout_height="match_parent">
15+
16+
<androidx.appcompat.widget.Toolbar
17+
android:id="@+id/add_edit_reminder_toolbar"
18+
android:layout_width="match_parent"
19+
android:layout_height="wrap_content"
20+
android:minHeight="?attr/actionBarSize"
21+
android:theme="@style/ActionBarStyle"
22+
android:background="?attr/appBarColor"
23+
app:title="Add / edit review reminder" />
24+
25+
<ScrollView
26+
android:id="@+id/add_edit_reminder_scrollview"
27+
android:layout_width="match_parent"
28+
android:layout_height="match_parent">
29+
30+
<LinearLayout
31+
android:id="@+id/add_edit_reminder_content"
32+
android:layout_width="match_parent"
33+
android:layout_height="wrap_content"
34+
android:orientation="vertical"
35+
android:paddingTop="24dp"
36+
android:paddingHorizontal="24dp">
37+
38+
<LinearLayout
39+
android:id="@+id/add_edit_reminder_time_section"
40+
android:layout_width="match_parent"
41+
android:layout_height="wrap_content"
42+
android:orientation="horizontal"
43+
android:layout_marginBottom="8dp">
44+
45+
<TextView
46+
android:id="@+id/add_edit_reminder_time_label"
47+
android:layout_width="0dp"
48+
android:layout_height="match_parent"
49+
android:layout_weight="1"
50+
android:gravity="center_vertical"
51+
android:text="Time:"
52+
android:textSize="18sp"
53+
tools:ignore="HardcodedText" />
54+
55+
<com.google.android.material.button.MaterialButton
56+
android:id="@+id/add_edit_reminder_time_button"
57+
android:layout_width="0dp"
58+
android:layout_weight="3"
59+
android:layout_height="match_parent"
60+
app:cornerRadius="8dp"
61+
android:layout_marginStart="12dp"
62+
android:textSize="24sp"
63+
android:text="12:00"
64+
tools:ignore="HardcodedText" />
65+
66+
</LinearLayout>
67+
68+
<LinearLayout
69+
android:id="@+id/add_edit_reminder_deck_section"
70+
android:layout_width="match_parent"
71+
android:layout_height="wrap_content"
72+
android:orientation="horizontal">
73+
74+
<TextView
75+
android:id="@+id/add_edit_reminder_deck_label"
76+
android:layout_width="0dp"
77+
android:layout_height="match_parent"
78+
android:layout_weight="1"
79+
android:gravity="center_vertical"
80+
android:text="Deck:"
81+
android:textSize="18sp"
82+
tools:ignore="HardcodedText" />
83+
84+
<Spinner
85+
android:id="@+id/add_edit_reminder_deck_spinner"
86+
android:layout_width="0dp"
87+
android:layout_weight="3"
88+
android:layout_height="match_parent"
89+
app:popupTheme="@style/ActionBar.Popup"
90+
android:minHeight="?minTouchTargetSize"
91+
android:layout_marginStart="12dp" />
92+
93+
</LinearLayout>
94+
95+
<LinearLayout
96+
android:id="@+id/add_edit_reminder_advanced_section"
97+
android:layout_width="match_parent"
98+
android:layout_height="wrap_content"
99+
android:orientation="vertical">
100+
101+
<LinearLayout
102+
android:id="@+id/add_edit_reminder_advanced_dropdown"
103+
android:layout_width="match_parent"
104+
android:layout_height="wrap_content"
105+
android:minHeight="?attr/minTouchTargetSize"
106+
android:orientation="horizontal">
107+
108+
<ImageView
109+
android:id="@+id/add_edit_reminder_advanced_dropdown_icon"
110+
android:layout_width="32dp"
111+
android:layout_height="32dp"
112+
android:layout_gravity="center_vertical"
113+
android:layout_marginEnd="8dp" />
114+
115+
<TextView
116+
android:id="@+id/add_edit_reminder_advanced_label"
117+
android:layout_width="match_parent"
118+
android:layout_height="wrap_content"
119+
android:layout_gravity="center_vertical"
120+
android:textSize="18sp"
121+
android:text="Advanced settings"
122+
tools:ignore="HardcodedText" />
123+
124+
</LinearLayout>
125+
126+
<LinearLayout
127+
android:id="@+id/add_edit_reminder_advanced_content"
128+
android:layout_width="match_parent"
129+
android:layout_height="wrap_content"
130+
android:layout_marginStart="32dp"
131+
android:orientation="vertical">
132+
133+
<LinearLayout
134+
android:id="@+id/add_edit_reminder_card_threshold_section"
135+
android:layout_width="match_parent"
136+
android:layout_height="wrap_content"
137+
android:orientation="horizontal"
138+
tools:ignore="UselessParent">
139+
140+
<LinearLayout
141+
android:id="@+id/add_edit_reminder_card_threshold_label_container"
142+
android:layout_width="0dp"
143+
android:layout_weight="1"
144+
android:layout_height="wrap_content"
145+
android:paddingVertical="4dp"
146+
android:orientation="vertical">
147+
148+
<TextView
149+
android:id="@+id/add_edit_reminder_card_threshold_label"
150+
android:layout_width="wrap_content"
151+
android:layout_height="wrap_content"
152+
android:layout_gravity="center_vertical"
153+
android:textSize="16sp"
154+
android:text="Card threshold:"
155+
tools:ignore="HardcodedText" />
156+
157+
<TextView
158+
android:id="@+id/add_edit_reminder_card_threshold_description"
159+
android:layout_width="wrap_content"
160+
android:layout_height="wrap_content"
161+
android:layout_gravity="center_vertical"
162+
android:text="Do not send me notifications if there are less than this many cards due"
163+
tools:ignore="HardcodedText" />
164+
165+
</LinearLayout>
166+
167+
<EditText
168+
android:id="@+id/add_edit_reminder_card_threshold_input"
169+
android:layout_width="0dp"
170+
android:layout_weight="1"
171+
android:layout_height="?minTouchTargetSize"
172+
android:layout_gravity="bottom"
173+
android:layout_marginStart="24dp"
174+
android:inputType="number" />
175+
176+
</LinearLayout>
177+
178+
</LinearLayout>
179+
180+
</LinearLayout>
181+
182+
</LinearLayout>
183+
184+
</ScrollView>
185+
186+
</LinearLayout>
187+
188+
</androidx.coordinatorlayout.widget.CoordinatorLayout>

0 commit comments

Comments
 (0)