From 9a3ab838b78eabcc306557f62600c6ac5c0a09fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kuba=20Szczodrzy=C5=84ski?= Date: Sun, 29 Sep 2019 21:48:35 +0200 Subject: [PATCH] [UI/Agenda] Fix teacher absence list truncated --- .../teacherabsence/TeacherAbsenceDialog.kt | 5 ++--- .../layout/dialog_teacher_absence_list.xml | 19 ++++++++++--------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/app/src/main/java/pl/szczodrzynski/edziennik/ui/dialogs/teacherabsence/TeacherAbsenceDialog.kt b/app/src/main/java/pl/szczodrzynski/edziennik/ui/dialogs/teacherabsence/TeacherAbsenceDialog.kt index 802f404a..55bf8ae0 100644 --- a/app/src/main/java/pl/szczodrzynski/edziennik/ui/dialogs/teacherabsence/TeacherAbsenceDialog.kt +++ b/app/src/main/java/pl/szczodrzynski/edziennik/ui/dialogs/teacherabsence/TeacherAbsenceDialog.kt @@ -20,7 +20,7 @@ class TeacherAbsenceDialog(val context: Context) { fun show(app: App, date: Date) { val dialog = MaterialDialog.Builder(context) .title(date.formattedString) - .customView(R.layout.dialog_teacher_absence_list, true) + .customView(R.layout.dialog_teacher_absence_list, false) .positiveText(R.string.close) .autoDismiss(false) .onPositive { dialog, _ -> dialog.dismiss()} @@ -29,8 +29,7 @@ class TeacherAbsenceDialog(val context: Context) { val customView: View = dialog.customView ?: return b = DataBindingUtil.bind(customView) ?: return - b.teacherAbsenceView.setHasFixedSize(false) - b.teacherAbsenceView.isNestedScrollingEnabled = false + b.teacherAbsenceView.setHasFixedSize(true) b.teacherAbsenceView.layoutManager = LinearLayoutManager(context) app.db.teacherAbsenceDao().getAllByDateFull(profileId, date).observe(context as LifecycleOwner, Observer { absenceList -> diff --git a/app/src/main/res/layout/dialog_teacher_absence_list.xml b/app/src/main/res/layout/dialog_teacher_absence_list.xml index 2608ce0d..e29a6a4b 100644 --- a/app/src/main/res/layout/dialog_teacher_absence_list.xml +++ b/app/src/main/res/layout/dialog_teacher_absence_list.xml @@ -1,14 +1,15 @@ - - - +