mirror of
https://github.com/szkolny-eu/szkolny-android.git
synced 2025-01-18 21:06:44 -06:00
[UI/Agenda] Fix teacher absence list truncated
This commit is contained in:
parent
e0a1a9a2ab
commit
9a3ab838b7
@ -20,7 +20,7 @@ class TeacherAbsenceDialog(val context: Context) {
|
|||||||
fun show(app: App, date: Date) {
|
fun show(app: App, date: Date) {
|
||||||
val dialog = MaterialDialog.Builder(context)
|
val dialog = MaterialDialog.Builder(context)
|
||||||
.title(date.formattedString)
|
.title(date.formattedString)
|
||||||
.customView(R.layout.dialog_teacher_absence_list, true)
|
.customView(R.layout.dialog_teacher_absence_list, false)
|
||||||
.positiveText(R.string.close)
|
.positiveText(R.string.close)
|
||||||
.autoDismiss(false)
|
.autoDismiss(false)
|
||||||
.onPositive { dialog, _ -> dialog.dismiss()}
|
.onPositive { dialog, _ -> dialog.dismiss()}
|
||||||
@ -29,8 +29,7 @@ class TeacherAbsenceDialog(val context: Context) {
|
|||||||
val customView: View = dialog.customView ?: return
|
val customView: View = dialog.customView ?: return
|
||||||
b = DataBindingUtil.bind(customView) ?: return
|
b = DataBindingUtil.bind(customView) ?: return
|
||||||
|
|
||||||
b.teacherAbsenceView.setHasFixedSize(false)
|
b.teacherAbsenceView.setHasFixedSize(true)
|
||||||
b.teacherAbsenceView.isNestedScrollingEnabled = false
|
|
||||||
b.teacherAbsenceView.layoutManager = LinearLayoutManager(context)
|
b.teacherAbsenceView.layoutManager = LinearLayoutManager(context)
|
||||||
|
|
||||||
app.db.teacherAbsenceDao().getAllByDateFull(profileId, date).observe(context as LifecycleOwner, Observer { absenceList ->
|
app.db.teacherAbsenceDao().getAllByDateFull(profileId, date).observe(context as LifecycleOwner, Observer { absenceList ->
|
||||||
|
@ -1,14 +1,15 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<layout xmlns:tools="http://schemas.android.com/tools"
|
<layout xmlns:tools="http://schemas.android.com/tools"
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<LinearLayout
|
|
||||||
android:orientation="vertical" android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent">
|
|
||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
android:id="@+id/teacherAbsenceView"
|
android:id="@+id/teacherAbsenceView"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
android:paddingTop="8dp"
|
||||||
|
android:paddingBottom="8dp"
|
||||||
|
android:paddingLeft="24dp"
|
||||||
|
android:paddingRight="24dp"
|
||||||
|
android:clipToPadding="false"
|
||||||
tools:listitem="@layout/row_dialog_teacher_absence_item" />
|
tools:listitem="@layout/row_dialog_teacher_absence_item" />
|
||||||
</LinearLayout>
|
|
||||||
</layout>
|
</layout>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user