WeserPlaner 1.0.1: pricing can now be adjusted - users can pick whether they want to see pricing for students or for employees; fragment launch settings has been changed to use a MaterialButtonGroup to support adding more options down the line

This commit is contained in:
denizk0461
2023-05-10 21:14:17 +02:00
parent 9ada2ca462
commit e33414b7e9
12 changed files with 228 additions and 79 deletions
+85 -34
View File
@@ -329,6 +329,56 @@
</androidx.constraintlayout.widget.ConstraintLayout>
<!-- Pricing -->
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginEnd="8dp"
android:orientation="vertical"
android:paddingHorizontal="16dp"
android:paddingVertical="8dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:fontFamily="@font/lato_bolditalic"
android:text="@string/settings_pricing_title"
android:textSize="16sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/settings_pricing_subtitle"
android:textSize="16sp" />
<com.google.android.material.button.MaterialButtonToggleGroup
android:id="@+id/toggle_pricing_group"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
app:singleSelection="true"
app:selectionRequired="true">
<com.google.android.material.button.MaterialButton
android:id="@+id/toggle_pricing_student"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:text="@string/settings_pricing_student"
style="?attr/materialButtonOutlinedStyle"/>
<com.google.android.material.button.MaterialButton
android:id="@+id/toggle_pricing_employee"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:text="@string/settings_pricing_employee"
style="?attr/materialButtonOutlinedStyle"/>
</com.google.android.material.button.MaterialButtonToggleGroup>
</androidx.appcompat.widget.LinearLayoutCompat>
</androidx.appcompat.widget.LinearLayoutCompat>
</com.google.android.material.card.MaterialCardView>
@@ -363,48 +413,49 @@
android:layout_height="wrap_content"
android:layout_marginHorizontal="16dp" />
<!-- show canteen plan on app launch -->
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/layout_launch_canteen"
<!-- Launch fragment -->
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginEnd="8dp"
android:orientation="vertical"
android:paddingHorizontal="16dp"
android:paddingVertical="8dp">
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="8dp"
android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/switch_launch_canteen"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:fontFamily="@font/lato_bolditalic"
android:text="@string/settings_launch_canteen_title"
android:textSize="16sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/settings_launch_canteen_subtitle"
android:textSize="16sp" />
</androidx.appcompat.widget.LinearLayoutCompat>
<com.google.android.material.materialswitch.MaterialSwitch
android:id="@+id/switch_launch_canteen"
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
android:fontFamily="@font/lato_bolditalic"
android:text="@string/settings_launch_canteen_title"
android:textSize="16sp" />
</androidx.constraintlayout.widget.ConstraintLayout>
<com.google.android.material.button.MaterialButtonToggleGroup
android:id="@+id/toggle_launch_fragment_group"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
app:singleSelection="true"
app:selectionRequired="true">
<com.google.android.material.button.MaterialButton
android:id="@+id/toggle_launch_fragment_schedule"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:text="@string/title_schedule_short"
style="?attr/materialButtonOutlinedStyle"/>
<com.google.android.material.button.MaterialButton
android:id="@+id/toggle_launch_fragment_canteen"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:text="@string/title_canteen_short"
style="?attr/materialButtonOutlinedStyle"/>
</com.google.android.material.button.MaterialButtonToggleGroup>
</androidx.appcompat.widget.LinearLayoutCompat>
<!-- crashlytics opt-in - unused. use for possible future implementation of Crashlytics -->
<androidx.constraintlayout.widget.ConstraintLayout