mirror of
https://github.com/szkolny-eu/szkolny-android.git
synced 2025-01-18 21:06:44 -06:00
[UI/Agenda] Update DayDialog for showing event group.
This commit is contained in:
parent
755b846b50
commit
776806caef
@ -7,7 +7,7 @@ package pl.szczodrzynski.edziennik.ui.dialogs.day
|
|||||||
import android.view.View
|
import android.view.View
|
||||||
import androidx.appcompat.app.AlertDialog
|
import androidx.appcompat.app.AlertDialog
|
||||||
import androidx.appcompat.app.AppCompatActivity
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
import androidx.lifecycle.Observer
|
import androidx.core.view.isVisible
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager
|
import androidx.recyclerview.widget.LinearLayoutManager
|
||||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
||||||
import kotlinx.coroutines.*
|
import kotlinx.coroutines.*
|
||||||
@ -19,6 +19,10 @@ import pl.szczodrzynski.edziennik.ui.dialogs.event.EventListAdapter
|
|||||||
import pl.szczodrzynski.edziennik.ui.dialogs.event.EventManualDialog
|
import pl.szczodrzynski.edziennik.ui.dialogs.event.EventManualDialog
|
||||||
import pl.szczodrzynski.edziennik.ui.dialogs.lessonchange.LessonChangeDialog
|
import pl.szczodrzynski.edziennik.ui.dialogs.lessonchange.LessonChangeDialog
|
||||||
import pl.szczodrzynski.edziennik.ui.dialogs.teacherabsence.TeacherAbsenceDialog
|
import pl.szczodrzynski.edziennik.ui.dialogs.teacherabsence.TeacherAbsenceDialog
|
||||||
|
import pl.szczodrzynski.edziennik.ui.modules.agenda.lessonchanges.LessonChangesEvent
|
||||||
|
import pl.szczodrzynski.edziennik.ui.modules.agenda.lessonchanges.LessonChangesEventRenderer
|
||||||
|
import pl.szczodrzynski.edziennik.ui.modules.agenda.teacherabsence.TeacherAbsenceEvent
|
||||||
|
import pl.szczodrzynski.edziennik.ui.modules.agenda.teacherabsence.TeacherAbsenceEventRenderer
|
||||||
import pl.szczodrzynski.edziennik.utils.SimpleDividerItemDecoration
|
import pl.szczodrzynski.edziennik.utils.SimpleDividerItemDecoration
|
||||||
import pl.szczodrzynski.edziennik.utils.models.Date
|
import pl.szczodrzynski.edziennik.utils.models.Date
|
||||||
import pl.szczodrzynski.edziennik.utils.models.Time
|
import pl.szczodrzynski.edziennik.utils.models.Time
|
||||||
@ -29,6 +33,7 @@ class DayDialog(
|
|||||||
val activity: AppCompatActivity,
|
val activity: AppCompatActivity,
|
||||||
val profileId: Int,
|
val profileId: Int,
|
||||||
val date: Date,
|
val date: Date,
|
||||||
|
val eventTypeId: Long? = null,
|
||||||
val onShowListener: ((tag: String) -> Unit)? = null,
|
val onShowListener: ((tag: String) -> Unit)? = null,
|
||||||
val onDismissListener: ((tag: String) -> Unit)? = null
|
val onDismissListener: ((tag: String) -> Unit)? = null
|
||||||
) : CoroutineScope {
|
) : CoroutineScope {
|
||||||
@ -109,38 +114,51 @@ class DayDialog(
|
|||||||
}
|
}
|
||||||
|
|
||||||
lessonChanges.ifNotEmpty {
|
lessonChanges.ifNotEmpty {
|
||||||
b.lessonChangeContainer.root.visibility = View.VISIBLE
|
LessonChangesEventRenderer().render(
|
||||||
b.lessonChangeContainer.lessonChangeCount.text = it.size.toString()
|
b.lessonChanges, LessonChangesEvent(
|
||||||
|
profileId = profileId,
|
||||||
|
date = date,
|
||||||
|
count = it.size,
|
||||||
|
showBadge = false
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
b.lessonChangeLayout.onClick {
|
b.lessonChangesFrame.onClick {
|
||||||
LessonChangeDialog(
|
LessonChangeDialog(
|
||||||
activity,
|
activity,
|
||||||
profileId,
|
profileId,
|
||||||
date,
|
date,
|
||||||
onShowListener = onShowListener,
|
onShowListener = onShowListener,
|
||||||
onDismissListener = onDismissListener
|
onDismissListener = onDismissListener
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
b.lessonChangesFrame.isVisible = lessonChanges.isNotEmpty()
|
||||||
|
|
||||||
val teacherAbsences = withContext(Dispatchers.Default) {
|
val teacherAbsences = withContext(Dispatchers.Default) {
|
||||||
app.db.teacherAbsenceDao().getAllByDateNow(profileId, date)
|
app.db.teacherAbsenceDao().getAllByDateNow(profileId, date)
|
||||||
}
|
}
|
||||||
|
|
||||||
teacherAbsences.ifNotEmpty {
|
teacherAbsences.ifNotEmpty {
|
||||||
b.teacherAbsenceContainer.root.visibility = View.VISIBLE
|
TeacherAbsenceEventRenderer().render(
|
||||||
b.teacherAbsenceContainer.teacherAbsenceCount.text = it.size.toString()
|
b.teacherAbsence, TeacherAbsenceEvent(
|
||||||
|
profileId = profileId,
|
||||||
|
date = date,
|
||||||
|
count = it.size
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
b.teacherAbsenceLayout.onClick {
|
b.teacherAbsenceFrame.onClick {
|
||||||
TeacherAbsenceDialog(
|
TeacherAbsenceDialog(
|
||||||
activity,
|
activity,
|
||||||
profileId,
|
profileId,
|
||||||
date,
|
date,
|
||||||
onShowListener = onShowListener,
|
onShowListener = onShowListener,
|
||||||
onDismissListener = onDismissListener
|
onDismissListener = onDismissListener
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
b.teacherAbsenceFrame.isVisible = teacherAbsences.isNotEmpty()
|
||||||
|
|
||||||
adapter = EventListAdapter(
|
adapter = EventListAdapter(
|
||||||
activity,
|
activity,
|
||||||
@ -169,8 +187,12 @@ class DayDialog(
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
app.db.eventDao().getAllByDate(profileId, date).observe(activity, Observer { events ->
|
app.db.eventDao().getAllByDate(profileId, date).observe(activity) { events ->
|
||||||
adapter.items = events
|
adapter.items = if (eventTypeId != null)
|
||||||
|
events.filter { it.type == eventTypeId }
|
||||||
|
else
|
||||||
|
events
|
||||||
|
|
||||||
if (b.eventsView.adapter == null) {
|
if (b.eventsView.adapter == null) {
|
||||||
b.eventsView.adapter = adapter
|
b.eventsView.adapter = adapter
|
||||||
b.eventsView.apply {
|
b.eventsView.apply {
|
||||||
@ -189,6 +211,6 @@ class DayDialog(
|
|||||||
b.eventsView.visibility = View.GONE
|
b.eventsView.visibility = View.GONE
|
||||||
b.eventsNoData.visibility = View.VISIBLE
|
b.eventsNoData.visibility = View.VISIBLE
|
||||||
}
|
}
|
||||||
})
|
}
|
||||||
}}
|
}}
|
||||||
}
|
}
|
||||||
|
@ -155,7 +155,7 @@ class AgendaFragmentDefault(
|
|||||||
app.profileId,
|
app.profileId,
|
||||||
date
|
date
|
||||||
)
|
)
|
||||||
is AgendaEventGroup -> DayDialog(activity, app.profileId, date)
|
is AgendaEventGroup -> DayDialog(activity, app.profileId, date, eventTypeId = event.typeId)
|
||||||
is BaseCalendarEvent -> if (event.isPlaceHolder)
|
is BaseCalendarEvent -> if (event.isPlaceHolder)
|
||||||
DayDialog(activity, app.profileId, date)
|
DayDialog(activity, app.profileId, date)
|
||||||
}
|
}
|
||||||
@ -260,6 +260,7 @@ class AgendaFragmentDefault(
|
|||||||
events.add(0, AgendaEventGroup(
|
events.add(0, AgendaEventGroup(
|
||||||
profileId = event.profileId,
|
profileId = event.profileId,
|
||||||
date = event.date,
|
date = event.date,
|
||||||
|
typeId = event.type,
|
||||||
typeName = event.typeName ?: "-",
|
typeName = event.typeName ?: "-",
|
||||||
typeColor = event.typeColor ?: event.eventColor,
|
typeColor = event.typeColor ?: event.eventColor,
|
||||||
count = list.size,
|
count = list.size,
|
||||||
|
@ -10,6 +10,7 @@ import pl.szczodrzynski.edziennik.utils.models.Date
|
|||||||
class AgendaEventGroup(
|
class AgendaEventGroup(
|
||||||
val profileId: Int,
|
val profileId: Int,
|
||||||
val date: Date,
|
val date: Date,
|
||||||
|
val typeId: Long,
|
||||||
val typeName: String,
|
val typeName: String,
|
||||||
val typeColor: Int,
|
val typeColor: Int,
|
||||||
val count: Int,
|
val count: Int,
|
||||||
@ -20,5 +21,5 @@ class AgendaEventGroup(
|
|||||||
color = typeColor,
|
color = typeColor,
|
||||||
showBadge = showBadge
|
showBadge = showBadge
|
||||||
) {
|
) {
|
||||||
override fun copy() = AgendaEventGroup(profileId, date, typeName, typeColor, count, showBadge)
|
override fun copy() = AgendaEventGroup(profileId, date, typeId, typeName, typeColor, count, showBadge)
|
||||||
}
|
}
|
||||||
|
@ -8,6 +8,7 @@ import android.view.View
|
|||||||
import androidx.core.view.isVisible
|
import androidx.core.view.isVisible
|
||||||
import com.github.tibolte.agendacalendarview.render.EventRenderer
|
import com.github.tibolte.agendacalendarview.render.EventRenderer
|
||||||
import pl.szczodrzynski.edziennik.R
|
import pl.szczodrzynski.edziennik.R
|
||||||
|
import pl.szczodrzynski.edziennik.databinding.AgendaCounterItemBinding
|
||||||
import pl.szczodrzynski.edziennik.databinding.AgendaWrappedCounterBinding
|
import pl.szczodrzynski.edziennik.databinding.AgendaWrappedCounterBinding
|
||||||
import pl.szczodrzynski.edziennik.resolveAttr
|
import pl.szczodrzynski.edziennik.resolveAttr
|
||||||
import pl.szczodrzynski.edziennik.setTintColor
|
import pl.szczodrzynski.edziennik.setTintColor
|
||||||
@ -33,5 +34,22 @@ class LessonChangesEventRenderer : EventRenderer<LessonChangesEvent>() {
|
|||||||
b.badge.isVisible = event.showItemBadge
|
b.badge.isVisible = event.showItemBadge
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun render(b: AgendaCounterItemBinding, event: LessonChangesEvent) {
|
||||||
|
val textColor = Colors.legibleTextColor(event.color)
|
||||||
|
|
||||||
|
b.card.foreground.setTintColor(event.color)
|
||||||
|
b.card.background.setTintColor(event.color)
|
||||||
|
b.name.setText(R.string.agenda_lesson_changes)
|
||||||
|
b.name.setTextColor(textColor)
|
||||||
|
b.count.text = event.count.toString()
|
||||||
|
b.count.setTextColor(textColor)
|
||||||
|
|
||||||
|
b.badgeBackground.isVisible = event.showItemBadge
|
||||||
|
b.badgeBackground.background.setTintColor(
|
||||||
|
android.R.attr.colorBackground.resolveAttr(b.root.context)
|
||||||
|
)
|
||||||
|
b.badge.isVisible = event.showItemBadge
|
||||||
|
}
|
||||||
|
|
||||||
override fun getEventLayout(): Int = R.layout.agenda_wrapped_counter
|
override fun getEventLayout(): Int = R.layout.agenda_wrapped_counter
|
||||||
}
|
}
|
||||||
|
@ -8,6 +8,7 @@ import android.view.View
|
|||||||
import androidx.core.view.isVisible
|
import androidx.core.view.isVisible
|
||||||
import com.github.tibolte.agendacalendarview.render.EventRenderer
|
import com.github.tibolte.agendacalendarview.render.EventRenderer
|
||||||
import pl.szczodrzynski.edziennik.R
|
import pl.szczodrzynski.edziennik.R
|
||||||
|
import pl.szczodrzynski.edziennik.databinding.AgendaCounterItemBinding
|
||||||
import pl.szczodrzynski.edziennik.databinding.AgendaWrappedCounterBinding
|
import pl.szczodrzynski.edziennik.databinding.AgendaWrappedCounterBinding
|
||||||
import pl.szczodrzynski.edziennik.setTintColor
|
import pl.szczodrzynski.edziennik.setTintColor
|
||||||
import pl.szczodrzynski.edziennik.utils.Colors
|
import pl.szczodrzynski.edziennik.utils.Colors
|
||||||
@ -29,5 +30,19 @@ class TeacherAbsenceEventRenderer : EventRenderer<TeacherAbsenceEvent>() {
|
|||||||
b.badge.isVisible = false
|
b.badge.isVisible = false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun render(b: AgendaCounterItemBinding, event: TeacherAbsenceEvent) {
|
||||||
|
val textColor = Colors.legibleTextColor(event.color)
|
||||||
|
|
||||||
|
b.card.foreground.setTintColor(event.color)
|
||||||
|
b.card.background.setTintColor(event.color)
|
||||||
|
b.name.setText(R.string.agenda_teacher_absence)
|
||||||
|
b.name.setTextColor(textColor)
|
||||||
|
b.count.text = event.count.toString()
|
||||||
|
b.count.setTextColor(textColor)
|
||||||
|
|
||||||
|
b.badgeBackground.isVisible = false
|
||||||
|
b.badge.isVisible = false
|
||||||
|
}
|
||||||
|
|
||||||
override fun getEventLayout(): Int = R.layout.agenda_wrapped_counter
|
override fun getEventLayout(): Int = R.layout.agenda_wrapped_counter
|
||||||
}
|
}
|
||||||
|
@ -1,33 +0,0 @@
|
|||||||
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
app:cardBackgroundColor="#78909c"
|
|
||||||
app:cardCornerRadius="5dp">
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:padding="10dp">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:gravity="center_vertical"
|
|
||||||
android:text="@string/agenda_lesson_changes"
|
|
||||||
android:textAppearance="@style/NavView.TextView.Medium"
|
|
||||||
android:textColor="@color/md_white_1000" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/lessonChangeCount"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:gravity="center"
|
|
||||||
android:textColor="@color/md_white_1000"
|
|
||||||
android:textSize="20sp"
|
|
||||||
tools:text="3" />
|
|
||||||
</LinearLayout>
|
|
||||||
</androidx.cardview.widget.CardView>
|
|
@ -1,33 +0,0 @@
|
|||||||
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
app:cardBackgroundColor="#ff1744"
|
|
||||||
app:cardCornerRadius="5dp">
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:padding="10dp">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:gravity="center_vertical"
|
|
||||||
android:text="@string/agenda_teacher_absence"
|
|
||||||
android:textAppearance="@style/NavView.TextView.Medium"
|
|
||||||
android:textColor="@color/md_white_1000" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/teacherAbsenceCount"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:gravity="center"
|
|
||||||
android:textColor="@color/md_white_1000"
|
|
||||||
android:textSize="20sp"
|
|
||||||
tools:text="3" />
|
|
||||||
</LinearLayout>
|
|
||||||
</androidx.cardview.widget.CardView>
|
|
@ -3,118 +3,108 @@
|
|||||||
~ Copyright (c) Kuba Szczodrzyński 2019-12-16.
|
~ Copyright (c) Kuba Szczodrzyński 2019-12-16.
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
<androidx.core.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
android:layout_width="match_parent"
|
||||||
<data>
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
</data>
|
<LinearLayout
|
||||||
<androidx.core.widget.NestedScrollView
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="wrap_content"
|
||||||
<LinearLayout
|
android:orientation="vertical"
|
||||||
|
android:paddingHorizontal="16dp"
|
||||||
|
android:paddingTop="24dp">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/dayDate"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginHorizontal="8dp"
|
||||||
|
android:layout_marginBottom="8dp"
|
||||||
|
android:textAppearance="@style/NavView.TextView.Title"
|
||||||
|
android:textIsSelectable="true"
|
||||||
|
tools:text="wtorek, 17 grudnia" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/lessonsInfo"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginHorizontal="8dp"
|
||||||
|
android:layout_marginBottom="8dp"
|
||||||
|
android:textAppearance="@style/NavView.TextView.Helper"
|
||||||
|
android:textIsSelectable="true"
|
||||||
|
android:visibility="gone"
|
||||||
|
tools:text="8:00 - 14:20 (7 lekcji, 6 godzin, 20 minut)"
|
||||||
|
tools:visibility="visible" />
|
||||||
|
|
||||||
|
<FrameLayout
|
||||||
|
android:id="@+id/lessonChangesFrame"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:foreground="?selectableItemBackground"
|
||||||
|
android:paddingHorizontal="8dp"
|
||||||
|
android:paddingVertical="5dp"
|
||||||
|
android:visibility="gone"
|
||||||
|
tools:visibility="visible">
|
||||||
|
|
||||||
|
<include
|
||||||
|
android:id="@+id/lessonChanges"
|
||||||
|
layout="@layout/agenda_counter_item" />
|
||||||
|
</FrameLayout>
|
||||||
|
|
||||||
|
<FrameLayout
|
||||||
|
android:id="@+id/teacherAbsenceFrame"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:foreground="?selectableItemBackground"
|
||||||
|
android:paddingHorizontal="8dp"
|
||||||
|
android:paddingVertical="5dp"
|
||||||
|
android:visibility="gone"
|
||||||
|
tools:visibility="visible">
|
||||||
|
|
||||||
|
<include
|
||||||
|
android:id="@+id/teacherAbsence"
|
||||||
|
layout="@layout/agenda_counter_item" />
|
||||||
|
</FrameLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/eventsNoData"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginHorizontal="8dp"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:paddingHorizontal="16dp"
|
android:paddingVertical="16dp"
|
||||||
android:paddingTop="24dp">
|
android:visibility="gone"
|
||||||
|
tools:visibility="visible">
|
||||||
|
|
||||||
<TextView
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
android:id="@+id/dayDate"
|
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginHorizontal="8dp"
|
android:layout_gravity="center"
|
||||||
android:layout_marginBottom="8dp"
|
android:drawablePadding="16dp"
|
||||||
android:textAppearance="@style/NavView.TextView.Title"
|
android:fontFamily="sans-serif-light"
|
||||||
android:textIsSelectable="true"
|
android:gravity="center"
|
||||||
tools:text="wtorek, 17 grudnia" />
|
android:text="@string/dialog_day_no_events"
|
||||||
|
android:textSize="24sp"
|
||||||
|
app:drawableTopCompat="@drawable/ic_no_events" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/lessonsInfo"
|
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginHorizontal="8dp"
|
android:layout_gravity="center"
|
||||||
android:layout_marginBottom="8dp"
|
android:gravity="center"
|
||||||
android:textAppearance="@style/NavView.TextView.Helper"
|
android:text="@string/dialog_no_events_hint"
|
||||||
android:textIsSelectable="true"
|
android:textStyle="italic" />
|
||||||
android:visibility="gone"
|
|
||||||
tools:text="8:00 - 14:20 (7 lekcji, 6 godzin, 20 minut)"
|
|
||||||
tools:visibility="visible" />
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/lessonChangeLayout"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:background="?selectableItemBackground">
|
|
||||||
|
|
||||||
<include
|
|
||||||
android:id="@+id/lessonChangeContainer"
|
|
||||||
layout="@layout/agenda_lesson_changes_item"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginHorizontal="8dp"
|
|
||||||
android:layout_marginVertical="5dp"
|
|
||||||
android:visibility="gone"
|
|
||||||
tools:visibility="visible" />
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/teacherAbsenceLayout"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:background="?selectableItemBackground">
|
|
||||||
|
|
||||||
<include
|
|
||||||
android:id="@+id/teacherAbsenceContainer"
|
|
||||||
layout="@layout/agenda_teacher_absence_item"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginHorizontal="8dp"
|
|
||||||
android:layout_marginVertical="5dp"
|
|
||||||
android:visibility="gone"
|
|
||||||
tools:visibility="visible" />
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/eventsNoData"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginHorizontal="8dp"
|
|
||||||
android:paddingVertical="16dp"
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:visibility="gone"
|
|
||||||
tools:visibility="visible">
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="center"
|
|
||||||
android:gravity="center"
|
|
||||||
app:drawableTopCompat="@drawable/ic_no_events"
|
|
||||||
android:drawablePadding="16dp"
|
|
||||||
android:fontFamily="sans-serif-light"
|
|
||||||
android:text="@string/dialog_day_no_events"
|
|
||||||
android:textSize="24sp" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/dialog_no_events_hint"
|
|
||||||
android:layout_gravity="center"
|
|
||||||
android:gravity="center"
|
|
||||||
android:textStyle="italic"/>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
|
||||||
android:id="@+id/eventsView"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="8dp"
|
|
||||||
android:clipToPadding="false"
|
|
||||||
tools:visibility="visible"
|
|
||||||
tools:listitem="@layout/event_list_item" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</androidx.core.widget.NestedScrollView>
|
|
||||||
</layout>
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
android:id="@+id/eventsView"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:clipToPadding="false"
|
||||||
|
tools:listitem="@layout/event_list_item"
|
||||||
|
tools:visibility="visible" />
|
||||||
|
</LinearLayout>
|
||||||
|
</androidx.core.widget.NestedScrollView>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user