Fix Homework dialog buttons layout
MODIFY
app/src/main/res/layout/dialog_homework.xml
app/src/main/res/layout/dialog_homework.xml
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/ic_all_divider"
- android:paddingHorizontal="10dp"
- android:paddingVertical="5dp">
+ android:gravity="end"
+ android:minHeight="52dp"
+ android:orientation="horizontal">
<com.google.android.material.button.MaterialButton
android:id="@+id/homeworkDialogRead"
- style="@style/Widget.MaterialComponents.Button.TextButton"
+ style="@style/Widget.MaterialComponents.Button.TextButton.Dialog"
android:layout_width="wrap_content"
android:layout_height="36dp"
android:layout_marginTop="8dp"
android:insetRight="0dp"
android:insetBottom="0dp"
android:minWidth="88dp"
+ android:layout_gravity="center_vertical"
android:layout_alignParentStart="true"
android:layout_alignParentBottom="true"
android:text="@string/homework_mark_as_done"
<com.google.android.material.button.MaterialButton
android:id="@+id/homeworkDialogClose"
- style="@style/Widget.MaterialComponents.Button.TextButton"
+ style="@style/Widget.MaterialComponents.Button.TextButton.Dialog"
android:layout_width="wrap_content"
android:layout_height="36dp"
android:layout_marginTop="8dp"
android:insetRight="0dp"
android:insetBottom="0dp"
android:minWidth="88dp"
+ android:layout_gravity="center_vertical"
android:layout_alignParentEnd="true"
android:layout_alignParentBottom="true"
android:text="@string/all_close"

MODIFY
app/src/main/res/layout/dialog_mobile_device.xml
app/src/main/res/layout/dialog_mobile_device.xml
<View
android:layout_width="292dp"
- android:layout_height="416dp"
+ android:layout_height="wrap_content"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent"

MODIFY
app/src/test/java/io/github/wulkanowy/ui/modules/grade/GradeAverageProviderTest.kt
app/src/test/java/io/github/wulkanowy/ui/modules/grade/GradeAverageProviderTest.kt
@@ -520,6 +520,7 @@ class GradeAverageProviderTest {
fun `calc all year average`() {
every { preferencesRepository.gradeAverageMode } returns GradeAverageMode.ALL_YEAR
every { preferencesRepository.gradeAverageForceCalc } returns false
+ every { preferencesRepository.isOptionalArithmeticAverage } returns false
coEvery {
gradeRepository.getGrades(
student,

Fix Homework dialog buttons layout (#1297)