Dialogs now use MaterialComponents styling, many elements now have rounded borders

This commit is contained in:
Deniz Düzgören
2019-10-13 19:27:06 +02:00
parent 37cf130ba0
commit bbecb640ea
12 changed files with 134 additions and 85 deletions
+2 -1
View File
@@ -6,7 +6,8 @@
android:paddingStart="16dp"
android:paddingEnd="16dp"
android:paddingBottom="8dp"
android:scrollbars="vertical">
android:scrollbars="vertical"
android:background="@color/colorBackgroundLight">
<TableRow
android:layout_width="match_parent"
+25 -5
View File
@@ -61,7 +61,11 @@
app:boxStrokeWidth="1dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/header_personalise">
app:layout_constraintTop_toBottomOf="@+id/header_personalise"
app:boxCornerRadiusTopStart="12dp"
app:boxCornerRadiusTopEnd="12dp"
app:boxCornerRadiusBottomStart="12dp"
app:boxCornerRadiusBottomEnd="12dp">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/edittext_name"
@@ -120,7 +124,11 @@
android:layout_marginEnd="8dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@+id/switch_greeting">
app:layout_constraintTop_toBottomOf="@+id/switch_greeting"
app:boxCornerRadiusTopStart="12dp"
app:boxCornerRadiusTopEnd="12dp"
app:boxCornerRadiusBottomStart="12dp"
app:boxCornerRadiusBottomEnd="12dp">
<AutoCompleteTextView
android:id="@+id/autocomplete_dark_mode"
@@ -328,7 +336,11 @@
app:layout_constraintEnd_toStartOf="@+id/button_group_help"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/header_filter"
android:importantForAutofill="no">
android:importantForAutofill="no"
app:boxCornerRadiusTopStart="12dp"
app:boxCornerRadiusTopEnd="12dp"
app:boxCornerRadiusBottomStart="12dp"
app:boxCornerRadiusBottomEnd="12dp">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/edittext_group"
@@ -371,7 +383,11 @@
app:boxStrokeWidth="1dp"
app:layout_constraintStart_toStartOf="@+id/textinputlayout_group"
app:layout_constraintTop_toBottomOf="@+id/textinputlayout_group"
app:layout_constraintEnd_toStartOf="@+id/button_courses_help">
app:layout_constraintEnd_toStartOf="@+id/button_courses_help"
app:boxCornerRadiusTopStart="12dp"
app:boxCornerRadiusTopEnd="12dp"
app:boxCornerRadiusBottomStart="12dp"
app:boxCornerRadiusBottomEnd="12dp">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/edittext_courses"
@@ -412,7 +428,11 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/button_order_help"
app:layout_constraintTop_toBottomOf="@+id/textinputlayout_courses">
app:layout_constraintTop_toBottomOf="@+id/textinputlayout_courses"
app:boxCornerRadiusTopStart="12dp"
app:boxCornerRadiusTopEnd="12dp"
app:boxCornerRadiusBottomStart="12dp"
app:boxCornerRadiusBottomEnd="12dp">
<AutoCompleteTextView
android:id="@+id/autocomplete_order"
+10 -7
View File
@@ -4,7 +4,8 @@
xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content">
android:layout_height="wrap_content"
android:background="@color/colorBackgroundLight">
<TextView
android:id="@+id/textviewtitle"
@@ -39,7 +40,8 @@
android:paddingBottom="24dp"
android:paddingTop="8dp"/>
<Button
<com.google.android.material.button.MaterialButton
style="@style/Widget.MaterialComponents.Button.OutlinedButton"
android:id="@+id/btnResetLaunch"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@@ -49,10 +51,11 @@
android:layout_marginStart="24dp"
android:layout_marginEnd="24dp"
android:text="Reset launch counter"
style="@style/Widget.MaterialComponents.Button.OutlinedButton"
tools:ignore="HardcodedText" />
tools:ignore="HardcodedText"
app:cornerRadius="12dp"/>
<Button
<com.google.android.material.button.MaterialButton
style="@style/Widget.MaterialComponents.Button.OutlinedButton"
android:id="@+id/btnResetNotif"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@@ -63,8 +66,8 @@
android:layout_marginEnd="24dp"
android:layout_marginBottom="16dp"
android:text="Reset ping counter"
style="@style/Widget.MaterialComponents.Button.OutlinedButton"
tools:ignore="HardcodedText" />
tools:ignore="HardcodedText"
app:cornerRadius="12dp"/>
</LinearLayout>
+12 -6
View File
@@ -3,7 +3,8 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="match_parent"
android:background="@color/colorBackgroundLight">
<TextView
android:id="@+id/textviewtitle"
@@ -19,7 +20,7 @@
android:textAlignment="viewStart"/>
<androidx.core.widget.NestedScrollView
android:layout_width="wrap_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="8dp">
@@ -34,7 +35,7 @@
<TextView
android:id="@+id/dialogtext"
android:layout_height="match_parent"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:textColor="@color/colorText"/>
@@ -47,7 +48,11 @@
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
android:textColorHint="@color/colorHint"
android:importantForAutofill="no">
android:importantForAutofill="no"
app:boxCornerRadiusTopStart="12dp"
app:boxCornerRadiusTopEnd="12dp"
app:boxCornerRadiusBottomStart="12dp"
app:boxCornerRadiusBottomEnd="12dp">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/dialog_edittext"
@@ -61,7 +66,7 @@
</com.google.android.material.textfield.TextInputLayout>
<Button
<com.google.android.material.button.MaterialButton
android:id="@+id/dialog_button"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@@ -69,7 +74,8 @@
android:text="@string/apply"
style="@style/Widget.MaterialComponents.Button.OutlinedButton"
app:strokeColor="@color/colorAccent"
app:strokeWidth="2dp"/>
app:strokeWidth="2dp"
app:cornerRadius="12dp"/>
</LinearLayout>
+2 -1
View File
@@ -1,7 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="match_parent"
android:background="@color/colorBackgroundLight">
<TextView
android:id="@+id/empty_textviewtitle"
+2 -1
View File
@@ -1,7 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="match_parent"
android:background="@color/colorBackgroundLight">
<TextView
android:id="@+id/empty_textviewtitle"
+3 -2
View File
@@ -44,10 +44,10 @@
<string name="grade_help_dialog_title">Wie du deine Klasse eintragen kannst</string>
<string name="courses_help_dialog_text">Trag die Kürzel für die Kurse ein, welche in deinem persönlichen Plan auftauchen sollen und über welche du benachrichtigt werden möchtest. Du kannst diese auf deinem Stundenplan finden.\n\nHier sind einige Beispiele:\n\nMathe in der 5. Klasse (Mittelstufe) wäre MAT.\n\nDer Englisch-Profilkurs in der E-Phase könnte ENP1 sein.\n\nDer Bio-Grundkurs in der Q1 ist z.B. bio1.\n\nMeist müssen Kurse für Mittelstufenschüler nicht eingetragen werden.\nTrenne mehrere Kurse mit Leerzeichen, Kommas sind optional.\nGroß- und Kleinschreibung wird beachtet.</string>
<string name="grade_help_dialog_text">Trage deine derzeitige Klasse ein, damit sie in deinem persönlichen Plan auftaucht und über Aktualisierungen informiert zu werden.\n\nAnmerkung:\n\nIn der Mittelstufe müssen Nummer und Buchstabe zusammen geschrieben werden, Beispiel: \"5a\".\n\nIn der E-Phase müssen diese durch ein Leerzeichen getrennt werden, Beispiel: \"18 a\".\n\nIn der Q1/Q2 sollen nur die Nummern eingetragen werden, Beispiel: \"17\".\n\nMehrere Klassen einzutragen ist nicht empfohlen.</string>
<string name="experimental_menu_dialog_text">Dieses Menü ist derzeit nur für Tests gedacht. Zusätzliche Funktionalität könnte in der Zukunft hinzugefügt werden. Probier\' gerne zufällige Codes aus.</string>
<string name="experimental_menu_dialog_text">Dieses Menü dient für Tests.</string>
<string name="apply">Anwenden</string>
<string name="invalid_code">Ungültiger Code</string>
<string name="experimental_menu_dialog_title">Experimentalmenü</string>
<string name="experimental_menu_dialog_title">Testmenü</string>
<string name="statistics_dialog_title">Statistikmenü</string>
<string name="enable_course_notifications">Kursbenachrichtigungen aktivieren</string>
<string name="no_personal_substitutions">Kein Entfall für dich</string>
@@ -162,4 +162,5 @@
<string name="ordering_systems_dialog_text">Du kannst zwischen zwei Sortierweisen auswählen, welche die Reihenfolge der Einträge auf dem Vertretungsplan bestimmen.\n\nStandardmäßig ist \'App-spezifisch\' ausgewählt; dies bietet einen konsistenten Plan sortiert nach Klassen, dann nach Stunden.\n\n\'Website-Original\' bietet die Original-Reihenfolge der Website. Diese ist jedoch nicht konsistent, weswegen \'App-spezifisch\' standardmäßig ausgewählt ist.</string>
<string name="error_please_try_again">Ein Fehler ist aufgetreten, bitte versuche es erneut</string>
<string name="thanks_for_using">Danke, dass du die App nutzt!</string>
<string name="congratulations_for_nothing">Gratulation! Du hast nichts erreicht.</string>
</resources>
+3 -2
View File
@@ -53,9 +53,9 @@
<string name="grade_help_dialog_text">Enter your current grade to have it appear in your personal plan and be notified about any information.\n\nNote:\n\nIn junior phase, put the number and letter together, as in \"5a\".\n\nIn E-Phase, separate them by a space, as in \"18 a\".\n\nIn Q1/Q2, only put in the number, as in \"17\".\n\nEntering multiple grades is not recommended.</string>
<string name="courses_help_dialog_title">How to enter your courses</string>
<string name="courses_help_dialog_text">You need to enter the course abbreviation for every course you want in your personal plan and want to be notified about. You can find them on your time table.\n\nHere\'s a few examples:\n\nMathematics in 5th grade (juniors) would be MAT.\n\nAdvanced English in E-Phase (seniors) for the English profile may be ENP1.\n\nBasic Biology in Q1 could be bio1.\n\nIn most cases, entering courses while in junior phase is redundant.\nSeparate multiple courses by spaces, commas are optional.\nCapitalisation is required.</string>
<string name="experimental_menu_dialog_title">Experimental Menu</string>
<string name="experimental_menu_dialog_title">Testing Menu</string>
<string name="statistics_dialog_title">Statistics Menu</string>
<string name="experimental_menu_dialog_text">This menu is currently intended for testing only. Additional features may be added in the future. Feel free to try arbitrary codes.</string>
<string name="experimental_menu_dialog_text">This menu is intended for testing only.</string>
<string name="apply">Apply</string>
<string name="invalid_code">Invalid code</string>
<string name="no_personal_substitutions">No substitutions for you</string>
@@ -174,4 +174,5 @@
<string name="ordering_systems_dialog_text">You may pick between two ordering systems that dictate the order in which the items on the substitution plan will appear in.\n\nThe default \'app-specific\' is an algorithm implemented in this app that provides a consistently-sorted substitution plan ordered just like the substitution plan on the website used to; sorted by classes, then by time.\n\n\'Website original\' offers the items on the substitution plan just like they\'re presented on the school website, but since these are not guaranteed to be consistent, \'app-specific\' is picked by default.</string>
<string name="error_please_try_again">An error occurred, please try again</string>
<string name="thanks_for_using">Thanks for using the app!</string>
<string name="congratulations_for_nothing">Congratulations! You have achieved nothing.</string>
</resources>
+5 -5
View File
@@ -19,11 +19,7 @@
<item name="android:statusBarColor">@color/colorBackground</item>
<item name="android:windowLightStatusBar" tools:targetApi="23">@bool/isLight</item>
<item name="android:windowLightNavigationBar" tools:targetApi="27">@bool/isLight</item>
</style>
<style name="AlertDialog" parent="Theme.MaterialComponents.Light.Dialog.Alert">
<item name="android:background">@color/colorBackgroundLight</item>
<item name="android:textColorPrimary">@color/colorText</item>
<item name="alertDialogTheme">@style/AppTheme0.AlertDialogTheme</item>
</style>
<!-- Launch / splash screen -->
@@ -33,4 +29,8 @@
<item name="android:navigationBarColor">@android:color/transparent</item>
</style>
<style name="AppTheme0.AlertDialogTheme" parent="ThemeOverlay.MaterialComponents.MaterialAlertDialog">
<item name="dialogCornerRadius">12dp</item>
</style>
</resources>