Finished style for schedule update bottom sheet (I think); implemented time picker, TODO: warn user if time span is invalid (start > end)

This commit is contained in:
denizk0461
2023-04-25 10:24:15 +02:00
parent 9b6e267cb0
commit 96862497e4
7 changed files with 82 additions and 13 deletions
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:color="?attr/colorOnSurfaceVariant" android:state_focused="true"/>
<item android:color="?attr/colorOutlineVariant"/>
</selector>
@@ -27,14 +27,15 @@
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:hint="@string/sheet_schedule_update_title_hint"
app:boxStrokeColor="@color/brightfuckingpink"
android:textColorHint="@color/brightfuckingpink">
app:boxStrokeColor="@color/selector_text_input"
app:hintTextColor="@color/selector_text_input">
<com.google.android.material.textfield.TextInputEditText
style="@style/ThemeOverlay.Material3.TextInputEditText.OutlinedBox"
android:textColor="?attr/colorOnSurfaceVariant"
android:id="@+id/edit_text_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="@color/brightfuckingpink"/>
android:layout_height="wrap_content"/>
</com.google.android.material.textfield.TextInputLayout>
@@ -54,9 +55,13 @@
android:layout_marginEnd="4dp"
android:maxLines="1"
android:scrollHorizontally="true"
android:hint="@string/sheet_schedule_update_lecturers_hint">
android:hint="@string/sheet_schedule_update_lecturers_hint"
app:boxStrokeColor="@color/selector_text_input"
app:hintTextColor="@color/selector_text_input">
<com.google.android.material.textfield.TextInputEditText
style="@style/ThemeOverlay.Material3.TextInputEditText.OutlinedBox"
android:textColor="?attr/colorOnSurfaceVariant"
android:id="@+id/edit_text_lecturers"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@@ -73,9 +78,13 @@
android:layout_marginBottom="8dp"
android:maxLines="1"
android:scrollHorizontally="true"
android:hint="@string/sheet_schedule_update_room_hint">
android:hint="@string/sheet_schedule_update_room_hint"
app:boxStrokeColor="@color/selector_text_input"
app:hintTextColor="@color/selector_text_input">
<com.google.android.material.textfield.TextInputEditText
style="@style/ThemeOverlay.Material3.TextInputEditText.OutlinedBox"
android:textColor="?attr/colorOnSurfaceVariant"
android:id="@+id/edit_text_room"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@@ -85,6 +94,36 @@
</androidx.appcompat.widget.LinearLayoutCompat>
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginBottom="8dp">
<com.google.android.material.button.MaterialButton
style="@style/Widget.Material3.Button.OutlinedButton"
android:id="@+id/button_time_start"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
app:strokeColor="?attr/colorOutlineVariant"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/sheet_schedule_update_timeslot_middle"
android:layout_marginHorizontal="8dp"/>
<com.google.android.material.button.MaterialButton
style="@style/Widget.Material3.Button.OutlinedButton"
android:id="@+id/button_time_end"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
app:strokeColor="?attr/colorOutlineVariant"/>
</androidx.appcompat.widget.LinearLayoutCompat>
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent"
android:layout_height="wrap_content"
+1
View File
@@ -30,6 +30,7 @@
<item name="android:textColor">@color/md_theme_dark_onSurfaceVariant</item>
<item name="android:scrollbarThumbVertical">@color/md_theme_dark_onSurfaceVariant</item>
<item name="colorOutlineVariant">@color/md_theme_dark_outlineVariant</item>
<!-- is this correct? -->
<item name="scheduleColorDefault">@color/md_theme_light_background</item>
+2
View File
@@ -1,4 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<attr name="scheduleColorDefault" type="color"/>
<attr name="colorOutlineVariant" type="color"/>
<attr name="colorOnSurfaceVariant" type="color"/>
</resources>
+1
View File
@@ -15,6 +15,7 @@
<string name="sheet_schedule_update_title_hint">Event title</string>
<string name="sheet_schedule_update_lecturers_hint">Lecturer(s)</string>
<string name="sheet_schedule_update_room_hint">Room</string>
<string name="sheet_schedule_update_timeslot_middle" translatable="false"></string>
<string name="title_schedule">Your Schedule</string>
<string name="title_food">Canteen Offers</string>
+1
View File
@@ -30,6 +30,7 @@
<item name="android:textColor">@color/md_theme_light_onSurfaceVariant</item>
<item name="android:scrollbarThumbVertical">@color/md_theme_light_onSurfaceVariant</item>
<item name="colorOutlineVariant">@color/md_theme_light_outlineVariant</item>
<!-- is this correct? -->
<item name="scheduleColorDefault">@color/md_theme_dark_background</item>