From cd76f99bbf8a8ff68ede6a81b74b7dd5f172286c Mon Sep 17 00:00:00 2001 From: Kacper Ziubryniewicz Date: Sat, 23 Nov 2019 22:26:21 +0100 Subject: [PATCH] [APIv2/Timetable] Add showing unread lesson changes --- .../timetable/v2/day/TimetableDayFragment.kt | 2 ++ app/src/main/res/drawable/unread_red_circle.xml | 10 ++++++++++ app/src/main/res/layout/timetable_lesson.xml | 16 +++++++++++++++- 3 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 app/src/main/res/drawable/unread_red_circle.xml diff --git a/app/src/main/java/pl/szczodrzynski/edziennik/ui/modules/timetable/v2/day/TimetableDayFragment.kt b/app/src/main/java/pl/szczodrzynski/edziennik/ui/modules/timetable/v2/day/TimetableDayFragment.kt index cbf09bde..cf1c4f94 100644 --- a/app/src/main/java/pl/szczodrzynski/edziennik/ui/modules/timetable/v2/day/TimetableDayFragment.kt +++ b/app/src/main/java/pl/szczodrzynski/edziennik/ui/modules/timetable/v2/day/TimetableDayFragment.kt @@ -247,6 +247,8 @@ class TimetableDayFragment : Fragment(), CoroutineScope { lb.detailsFirst.text = listOfNotEmpty(timeRange, classroomInfo).concat(bullet) lb.detailsSecond.text = listOfNotEmpty(teacherInfo, teamInfo).concat(bullet) + lb.unread = lesson.type != Lesson.TYPE_NORMAL && !lesson.seen + //lb.subjectName.typeface = Typeface.create("sans-serif-light", Typeface.BOLD) when (lesson.type) { Lesson.TYPE_NORMAL -> { diff --git a/app/src/main/res/drawable/unread_red_circle.xml b/app/src/main/res/drawable/unread_red_circle.xml new file mode 100644 index 00000000..8679f344 --- /dev/null +++ b/app/src/main/res/drawable/unread_red_circle.xml @@ -0,0 +1,10 @@ + + + + + + + diff --git a/app/src/main/res/layout/timetable_lesson.xml b/app/src/main/res/layout/timetable_lesson.xml index 25a3db56..0e2d4cdc 100644 --- a/app/src/main/res/layout/timetable_lesson.xml +++ b/app/src/main/res/layout/timetable_lesson.xml @@ -11,6 +11,9 @@ + + + - \ No newline at end of file +