[UI/Events] Update Day Dialog. Add Event List Adapter to Timetable Lesson Dialog.

This commit is contained in:
Kuba Szczodrzyński 2019-12-18 20:07:38 +01:00
parent d70b0c0c3f
commit 16320b4486
9 changed files with 283 additions and 136 deletions

1
.idea/.name Normal file
View File

@ -0,0 +1 @@
Szkolny.eu

View File

@ -11,6 +11,7 @@
<item index="1" class="java.lang.String" itemvalue="org.greenrobot.eventbus.Subscribe" /> <item index="1" class="java.lang.String" itemvalue="org.greenrobot.eventbus.Subscribe" />
</list> </list>
</component> </component>
<component name="ExternalStorageConfigurationManager" enabled="true" />
<component name="NullableNotNullManager"> <component name="NullableNotNullManager">
<option name="myDefaultNullable" value="org.jetbrains.annotations.Nullable" /> <option name="myDefaultNullable" value="org.jetbrains.annotations.Nullable" />
<option name="myDefaultNotNull" value="androidx.annotation.RecentlyNonNull" /> <option name="myDefaultNotNull" value="androidx.annotation.RecentlyNonNull" />

View File

@ -92,7 +92,7 @@ class DayDialog(
onEventEditClick = { onEventEditClick = {
EventManualDialog( EventManualDialog(
activity, activity,
profileId, it.profileId,
editingEvent = it, editingEvent = it,
onShowListener = onShowListener, onShowListener = onShowListener,
onDismissListener = onDismissListener onDismissListener = onDismissListener
@ -105,6 +105,7 @@ class DayDialog(
if (b.eventsView.adapter == null) { if (b.eventsView.adapter == null) {
b.eventsView.adapter = adapter b.eventsView.adapter = adapter
b.eventsView.apply { b.eventsView.apply {
isNestedScrollingEnabled = false
setHasFixedSize(true) setHasFixedSize(true)
layoutManager = LinearLayoutManager(context) layoutManager = LinearLayoutManager(context)
addItemDecoration(SimpleDividerItemDecoration(context)) addItemDecoration(SimpleDividerItemDecoration(context))

View File

@ -461,7 +461,7 @@ class EventManualDialog(
b.teacherDropdown.deselect() b.teacherDropdown.deselect()
} }
else { else {
defaultTime?.let { val setTime: (Time) -> Unit = {
event.startTime = it event.startTime = it
if (b.timeDropdown.select(it) == null) if (b.timeDropdown.select(it) == null)
b.timeDropdown.select(TextInputDropDown.Item( b.timeDropdown.select(TextInputDropDown.Item(
@ -470,23 +470,10 @@ class EventManualDialog(
tag = it tag = it
)) ))
} }
defaultTime?.let(setTime)
editingEvent?.startTime?.let { editingEvent?.startTime?.let(setTime)
if (b.timeDropdown.select(it) == null) defaultLesson?.displayStartTime?.let(setTime)
b.timeDropdown.select(TextInputDropDown.Item( defaultHour?.let(setTime)
it.value.toLong(),
it.stringHM,
tag = it
))
}
defaultLesson?.let {
b.timeDropdown.select(it.displayStartTime?.value?.toLong())
}
defaultHour?.let {
b.timeDropdown.select(it.value.toLong())
}
} }
defaultLoaded = true defaultLoaded = true
b.timeDropdown.isEnabled = true b.timeDropdown.isEnabled = true
@ -554,7 +541,7 @@ class EventManualDialog(
private fun saveEvent() { private fun saveEvent() {
val date = b.dateDropdown.selected?.tag.instanceOfOrNull<Date>() val date = b.dateDropdown.selected?.tag.instanceOfOrNull<Date>()
val lesson = b.timeDropdown.selected?.tag.instanceOfOrNull<LessonFull>() val startTime = b.timeDropdown.selected?.tag.instanceOfOrNull<Time>()
val teamId = b.teamDropdown.selected?.id val teamId = b.teamDropdown.selected?.id
val type = b.typeDropdown.selected?.id val type = b.typeDropdown.selected?.id
val topic = b.topic.text?.toString() val topic = b.topic.text?.toString()
@ -592,7 +579,7 @@ class EventManualDialog(
profileId, profileId,
editingEvent?.id ?: id, editingEvent?.id ?: id,
date, date,
lesson?.displayStartTime, startTime,
topic, topic,
customColor ?: -1, customColor ?: -1,
type?.toInt() ?: Event.TYPE_DEFAULT, type?.toInt() ?: Event.TYPE_DEFAULT,

View File

@ -6,61 +6,84 @@ package pl.szczodrzynski.edziennik.ui.dialogs.timetable
import android.content.Intent import android.content.Intent
import android.view.View import android.view.View
import android.widget.Toast
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.recyclerview.widget.LinearLayoutManager
import com.google.android.material.dialog.MaterialAlertDialogBuilder import com.google.android.material.dialog.MaterialAlertDialogBuilder
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.Job
import pl.szczodrzynski.edziennik.App
import pl.szczodrzynski.edziennik.R import pl.szczodrzynski.edziennik.R
import pl.szczodrzynski.edziennik.data.db.modules.timetable.Lesson import pl.szczodrzynski.edziennik.data.db.modules.timetable.Lesson
import pl.szczodrzynski.edziennik.data.db.modules.timetable.LessonFull import pl.szczodrzynski.edziennik.data.db.modules.timetable.LessonFull
import pl.szczodrzynski.edziennik.databinding.DialogLessonDetailsBinding import pl.szczodrzynski.edziennik.databinding.DialogLessonDetailsBinding
import pl.szczodrzynski.edziennik.onClick
import pl.szczodrzynski.edziennik.setText import pl.szczodrzynski.edziennik.setText
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.modules.timetable.v2.TimetableFragment import pl.szczodrzynski.edziennik.ui.modules.timetable.v2.TimetableFragment
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.Week import pl.szczodrzynski.edziennik.utils.models.Week
import kotlin.coroutines.CoroutineContext
class LessonDetailsDialog( class LessonDetailsDialog(
val activity: AppCompatActivity, val activity: AppCompatActivity,
val lesson: LessonFull, val lesson: LessonFull,
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 {
companion object { companion object {
private const val TAG = "LessonDetailsDialog" private const val TAG = "LessonDetailsDialog"
} }
private lateinit var app: App
private lateinit var b: DialogLessonDetailsBinding private lateinit var b: DialogLessonDetailsBinding
private lateinit var dialog: AlertDialog private lateinit var dialog: AlertDialog
private val job = Job()
override val coroutineContext: CoroutineContext
get() = job + Dispatchers.Main
private lateinit var adapter: EventListAdapter
init { run { init { run {
if (activity.isFinishing) if (activity.isFinishing)
return@run return@run
onShowListener?.invoke(TAG) onShowListener?.invoke(TAG)
app = activity.applicationContext as App
b = DialogLessonDetailsBinding.inflate(activity.layoutInflater) b = DialogLessonDetailsBinding.inflate(activity.layoutInflater)
dialog = MaterialAlertDialogBuilder(activity) dialog = MaterialAlertDialogBuilder(activity)
.setView(b.root) .setView(b.root)
.setPositiveButton(R.string.close) { dialog, _ -> .setPositiveButton(R.string.close) { dialog, _ ->
dialog.dismiss() dialog.dismiss()
} }
.setNeutralButton(R.string.add) { _, _ -> .setNeutralButton(R.string.add, null)
EventManualDialog(
activity,
lesson.profileId,
lesson,
onShowListener = onShowListener,
onDismissListener = onDismissListener
)
}
.setOnDismissListener { .setOnDismissListener {
onDismissListener?.invoke(TAG) onDismissListener?.invoke(TAG)
} }
.show() .show()
dialog.getButton(AlertDialog.BUTTON_NEUTRAL)?.onClick {
EventManualDialog(
activity,
lesson.profileId,
defaultLesson = lesson,
onShowListener = onShowListener,
onDismissListener = onDismissListener
)
}
update() update()
}} }}
private fun update() { private fun update() {
b.lesson = lesson b.lesson = lesson
val lessonDate = lesson.displayDate ?: return val lessonDate = lesson.displayDate ?: return
val lessonTime = lesson.displayStartTime ?: return
b.lessonDate.text = Week.getFullDayName(lessonDate.weekDay) + ", " + lessonDate.formattedString b.lessonDate.text = Week.getFullDayName(lessonDate.weekDay) + ", " + lessonDate.formattedString
if (lesson.type >= Lesson.TYPE_SHIFTED_SOURCE) { if (lesson.type >= Lesson.TYPE_SHIFTED_SOURCE) {
@ -138,5 +161,43 @@ class LessonDetailsDialog(
if (lesson.type != Lesson.TYPE_CANCELLED && lesson.displayTeamId != null) { if (lesson.type != Lesson.TYPE_CANCELLED && lesson.displayTeamId != null) {
b.teamName = lesson.teamName b.teamName = lesson.teamName
} }
adapter = EventListAdapter(
activity,
onItemClick = {
Toast.makeText(activity, "Event clicked ${it.topic}", Toast.LENGTH_SHORT).show()
},
onEventEditClick = {
EventManualDialog(
activity,
it.profileId,
editingEvent = it,
onShowListener = onShowListener,
onDismissListener = onDismissListener
)
}
)
app.db.eventDao().getAllByDateTime(lesson.profileId, lessonDate, lessonTime).observe(activity, Observer { events ->
adapter.items = events
if (b.eventsView.adapter == null) {
b.eventsView.adapter = adapter
b.eventsView.apply {
isNestedScrollingEnabled = false
setHasFixedSize(true)
layoutManager = LinearLayoutManager(context)
addItemDecoration(SimpleDividerItemDecoration(context))
}
}
adapter.notifyDataSetChanged()
if (events != null && events.isNotEmpty()) {
b.eventsView.visibility = View.VISIBLE
b.eventsNoData.visibility = View.GONE
} else {
b.eventsView.visibility = View.GONE
b.eventsNoData.visibility = View.VISIBLE
}
})
} }
} }

View File

@ -8,25 +8,25 @@
<data> <data>
</data> </data>
<ScrollView <androidx.core.widget.NestedScrollView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">
<LinearLayout <LinearLayout
android:orientation="vertical"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingTop="24dp" android:orientation="vertical"
android:paddingLeft="16dp" android:paddingLeft="16dp"
android:paddingTop="24dp"
android:paddingRight="16dp"> android:paddingRight="16dp">
<TextView <TextView
android:id="@+id/dayDate" 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:textIsSelectable="true"
android:textAppearance="@style/NavView.TextView.Title"
android:layout_marginLeft="8dp" android:layout_marginLeft="8dp"
android:layout_marginRight="8dp" android:layout_marginRight="8dp"
android:textAppearance="@style/NavView.TextView.Title"
android:textIsSelectable="true"
tools:text="wtorek, 17 grudnia" /> tools:text="wtorek, 17 grudnia" />
<include <include
@ -34,10 +34,10 @@
layout="@layout/row_lesson_change_item" layout="@layout/row_lesson_change_item"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:layout_marginBottom="5dp"
android:layout_marginLeft="8dp" android:layout_marginLeft="8dp"
android:layout_marginTop="5dp"
android:layout_marginRight="8dp" android:layout_marginRight="8dp"
android:layout_marginBottom="5dp"
android:visibility="gone" android:visibility="gone"
tools:visibility="visible" /> tools:visibility="visible" />
@ -78,7 +78,7 @@
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="Możesz wpisać wydarzenie ręcznie, używając przycisku Dodaj." android:text="@string/dialog_no_events_hint"
android:gravity="center" android:gravity="center"
android:textStyle="italic"/> android:textStyle="italic"/>
@ -90,9 +90,9 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="8dp" android:layout_marginTop="8dp"
android:clipToPadding="false" android:clipToPadding="false"
tools:visibility="gone" tools:visibility="visible"
tools:listitem="@layout/event_list_item" /> tools:listitem="@layout/event_list_item" />
</LinearLayout> </LinearLayout>
</ScrollView> </androidx.core.widget.NestedScrollView>
</layout> </layout>

View File

@ -21,20 +21,24 @@
<variable name="oldTeamName" type="String" /> <variable name="oldTeamName" type="String" />
<variable name="teamName" type="String" /> <variable name="teamName" type="String" />
</data> </data>
<ScrollView <androidx.core.widget.NestedScrollView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">
<LinearLayout <LinearLayout
android:orientation="vertical"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:padding="24dp"> android:orientation="vertical"
android:paddingLeft="16dp"
android:paddingTop="24dp"
android:paddingRight="16dp">
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="horizontal" android:layout_marginLeft="8dp"
android:baselineAligned="false"> android:layout_marginRight="8dp"
android:baselineAligned="false"
android:orientation="horizontal">
<LinearLayout <LinearLayout
android:orientation="vertical" android:orientation="vertical"
@ -110,7 +114,9 @@
android:id="@+id/shiftedLayout" android:id="@+id/shiftedLayout"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="8dp"
android:layout_marginTop="8dp" android:layout_marginTop="8dp"
android:layout_marginRight="8dp"
android:baselineAligned="false" android:baselineAligned="false"
android:gravity="center_vertical" android:gravity="center_vertical"
android:orientation="horizontal"> android:orientation="horizontal">
@ -129,99 +135,185 @@
style="@style/Widget.MaterialComponents.Button.OutlinedButton" style="@style/Widget.MaterialComponents.Button.OutlinedButton"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="Przejdź" /> android:text="@string/dialog_lesson_go_to_button" />
</LinearLayout> </LinearLayout>
<TextView <LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="8dp"
android:layout_marginTop="8dp"
android:layout_marginRight="8dp"
android:baselineAligned="false"
android:orientation="horizontal">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_marginEnd="8dp"
android:layout_marginRight="8dp"
android:orientation="vertical">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAppearance="@style/NavView.TextView.Helper"
android:text="@string/dialog_lesson_details_teacher"
android:visibility="@{teacherName != null || oldTeacherName != null ? View.VISIBLE : View.GONE}"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAppearance="@style/NavView.TextView.Helper"
android:text="@{oldTeacherName}"
android:textIsSelectable="true"
android:singleLine="true"
android:visibility="@{oldTeacherName != null ? View.VISIBLE : View.GONE}"
app:strikeThrough="@{true}"
tools:text="Janósz Kowalski" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@{teacherName}"
android:textIsSelectable="true"
android:visibility="@{teacherName != null ? View.VISIBLE : View.GONE}"
tools:text="Janósz Kowalski" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAppearance="@style/NavView.TextView.Helper"
android:text="@string/dialog_lesson_details_team"
android:visibility="@{teamName != null || oldTeamName != null ? View.VISIBLE : View.GONE}"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAppearance="@style/NavView.TextView.Helper"
android:text="@{oldTeamName}"
android:textIsSelectable="true"
android:visibility="@{oldTeamName != null ? View.VISIBLE : View.GONE}"
app:strikeThrough="@{true}"
tools:text="013 informatyczna" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@{teamName}"
android:textIsSelectable="true"
android:visibility="@{teamName != null ? View.VISIBLE : View.GONE}"
tools:text="013 informatyczna" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="8dp"
android:layout_marginRight="8dp"
android:baselineAligned="false"
android:orientation="horizontal">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:textAppearance="@style/NavView.TextView.Helper"
android:text="@string/dialog_lesson_details_classroom"
android:visibility="@{classroom != null || oldClassroom != null ? View.VISIBLE : View.GONE}"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAppearance="@style/NavView.TextView.Helper"
android:text="@{oldClassroom}"
android:textIsSelectable="true"
android:visibility="@{oldClassroom != null ? View.VISIBLE : View.GONE}"
app:strikeThrough="@{true}"
tools:text="013 informatyczna" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@{classroom}"
android:textIsSelectable="true"
android:visibility="@{classroom != null ? View.VISIBLE : View.GONE}"
tools:text="013 informatyczna" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:textAppearance="@style/NavView.TextView.Helper"
android:visibility="@{App.devMode ? View.VISIBLE : View.GONE}"
android:text="@string/dialog_lesson_details_id" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="0dp"
android:text="@{Long.toString(lesson.id)}"
android:textIsSelectable="true"
android:visibility="@{App.devMode ? View.VISIBLE : View.GONE}"
tools:text="12345" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:id="@+id/eventsNoData"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="8dp"
android:layout_marginRight="8dp"
android:paddingTop="16dp"
android:paddingBottom="16dp"
android:orientation="vertical"
android:visibility="gone"
tools:visibility="visible">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:drawableTop="@drawable/ic_no_events"
android:drawablePadding="16dp"
android:fontFamily="sans-serif-light"
android:text="@string/dialog_lesson_no_events"
android:textSize="24sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/dialog_no_events_hint"
android:gravity="center"
android:textStyle="italic"/>
</LinearLayout>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/eventsView"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="8dp" android:layout_marginTop="8dp"
android:textAppearance="@style/NavView.TextView.Helper" android:clipToPadding="false"
android:text="@string/dialog_lesson_details_teacher" tools:visibility="visible"
android:visibility="@{teacherName != null || oldTeacherName != null ? View.VISIBLE : View.GONE}"/> tools:listitem="@layout/event_list_item" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAppearance="@style/NavView.TextView.Helper"
android:text="@{oldTeacherName}"
android:textIsSelectable="true"
android:visibility="@{oldTeacherName != null ? View.VISIBLE : View.GONE}"
app:strikeThrough="@{true}"
tools:text="Janósz Kowalski" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@{teacherName}"
android:textIsSelectable="true"
android:visibility="@{teacherName != null ? View.VISIBLE : View.GONE}"
tools:text="Janósz Kowalski" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:textAppearance="@style/NavView.TextView.Helper"
android:text="@string/dialog_lesson_details_classroom"
android:visibility="@{classroom != null || oldClassroom != null ? View.VISIBLE : View.GONE}"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAppearance="@style/NavView.TextView.Helper"
android:text="@{oldClassroom}"
android:textIsSelectable="true"
android:visibility="@{oldClassroom != null ? View.VISIBLE : View.GONE}"
app:strikeThrough="@{true}"
tools:text="013 informatyczna" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@{classroom}"
android:textIsSelectable="true"
android:visibility="@{classroom != null ? View.VISIBLE : View.GONE}"
tools:text="013 informatyczna" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:textAppearance="@style/NavView.TextView.Helper"
android:text="@string/dialog_lesson_details_team"
android:visibility="@{teamName != null || oldTeamName != null ? View.VISIBLE : View.GONE}"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAppearance="@style/NavView.TextView.Helper"
android:text="@{oldTeamName}"
android:textIsSelectable="true"
android:visibility="@{oldTeamName != null ? View.VISIBLE : View.GONE}"
app:strikeThrough="@{true}"
tools:text="013 informatyczna" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@{teamName}"
android:textIsSelectable="true"
android:visibility="@{teamName != null ? View.VISIBLE : View.GONE}"
tools:text="013 informatyczna" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:textAppearance="@style/NavView.TextView.Helper"
android:visibility="@{App.devMode ? View.VISIBLE : View.GONE}"
android:text="@string/dialog_lesson_details_id" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="0dp"
android:text="@{Long.toString(lesson.id)}"
android:textIsSelectable="true"
android:visibility="@{App.devMode ? View.VISIBLE : View.GONE}"
tools:text="12345" />
</LinearLayout> </LinearLayout>
</ScrollView> </androidx.core.widget.NestedScrollView>
</layout> </layout>

View File

@ -45,12 +45,13 @@
<TextView <TextView
android:id="@+id/topic" android:id="@+id/topic"
android:layout_width="wrap_content" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:layout_weight="1"
android:textAppearance="@style/NavView.TextView.Medium" android:textAppearance="@style/NavView.TextView.Medium"
android:maxLines="3" android:maxLines="3"
tools:text="Rozdział II: Panowanie Piastów i Jagiellonów.Przeniesiony z 11 grudnia." /> android:ellipsize="end"
tools:text="Rozdział II: Panowanie Piastów i Jagiellonów.Przeniesiony z 11 grudnia. Nie wiem co się dzieje w tym roku nie będzie już religii w szkołach podstawowych w Polsce i Europie zachodniej Afryki" />
<com.google.android.material.button.MaterialButton <com.google.android.material.button.MaterialButton
android:id="@+id/editButton" android:id="@+id/editButton"
@ -71,6 +72,6 @@
android:textAppearance="@style/NavView.TextView.Helper" android:textAppearance="@style/NavView.TextView.Helper"
android:singleLine="true" android:singleLine="true"
android:ellipsize="middle" android:ellipsize="middle"
android:text="Udostępniono 10 grudnia przez Ktoś Z Twojej Klasy • 2B3T" /> tools:text="Udostępniono 10 grudnia przez Ktoś Z Twojej Klasy • 2B3T" />
</LinearLayout> </LinearLayout>
</layout> </layout>

View File

@ -1076,4 +1076,7 @@
<string name="settings_theme_snowfall_subtext">Dzwonią dzwonki sań</string> <string name="settings_theme_snowfall_subtext">Dzwonią dzwonki sań</string>
<string name="dialog_day_no_events">Brak wydarzeń tego dnia.</string> <string name="dialog_day_no_events">Brak wydarzeń tego dnia.</string>
<string name="dialog_day_date_format">%s, %s</string> <string name="dialog_day_date_format">%s, %s</string>
<string name="dialog_lesson_go_to_button">Przejdź</string>
<string name="dialog_no_events_hint">Możesz wpisać wydarzenie ręcznie, używając przycisku Dodaj.</string>
<string name="dialog_lesson_no_events">Brak wydarzeń na tej lekcji.</string>
</resources> </resources>