Added drop down menu in the settings to switch between app-specific and website original sorting procedures

This commit is contained in:
Deniz Düzgören
2019-09-24 09:32:25 +02:00
parent 1882034ec5
commit 87d4f11cba
13 changed files with 114 additions and 24 deletions
+36 -2
View File
@@ -363,7 +363,6 @@
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
android:layout_marginBottom="8dp"
android:hint="@string/courses"
android:importantForAutofill="no"
android:textColorHint="@color/colorHint"
@@ -371,7 +370,6 @@
app:boxStrokeWidth="1dp"
app:layout_constraintStart_toStartOf="@+id/txtLayoutClasses"
app:layout_constraintTop_toBottomOf="@+id/txtLayoutClasses"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/chipHelpCourses">
<com.google.android.material.textfield.TextInputEditText
@@ -401,6 +399,42 @@
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@+id/txtLayoutCourses" />
<com.google.android.material.textfield.TextInputLayout android:id="@+id/order_drop_down"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.ExposedDropdownMenu"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:layout_marginStart="8dp"
android:layout_marginEnd="8dp"
android:layout_marginBottom="8dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/chip_help_ordering"
app:layout_constraintTop_toBottomOf="@+id/txtLayoutCourses">
<AutoCompleteTextView
android:id="@+id/order_drop_down_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:editable="false"
android:hint="@string/ordering_system_hint"
android:textColor="@color/colorText"
android:textSize="14sp"/>
</com.google.android.material.textfield.TextInputLayout>
<ImageButton
android:id="@+id/chip_help_ordering"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="16dp"
android:src="@drawable/ic_qmark"
android:tint="@color/colorText"
android:backgroundTint="@android:color/transparent"
app:layout_constraintBottom_toBottomOf="@+id/order_drop_down"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@+id/order_drop_down" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.cardview.widget.CardView>
+7
View File
@@ -157,4 +157,11 @@
<string name="logging_in">Einloggen…</string>
<string name="load_page_again">Lade Login-Seite erneut</string>
<string name="logged_in">Du bist eingeloggt!</string>
<string-array name="ordering_systems">
<item>App-spezifisch</item>
<item>Website-Original</item>
</string-array>
<string name="ordering_system_hint">Sortierweise</string>
<string name="ordering_systems_dialog_title">Informationen über Sortierweisen</string>
<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>
</resources>
+7
View File
@@ -169,4 +169,11 @@
<string name="logging_in">Logging in…</string>
<string name="load_page_again">Load login page again</string>
<string name="logged_in">Login successful!</string>
<string-array name="ordering_systems">
<item>App-specific</item>
<item>Website original</item>
</string-array>
<string name="ordering_system_hint">Ordering system</string>
<string name="ordering_systems_dialog_title">Information on ordering systems</string>
<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>
</resources>