mirror of
https://github.com/szkolny-eu/szkolny-android.git
synced 2025-01-31 13:48:20 +01:00
[APIv2/Timetable] Add showing unread lesson changes
This commit is contained in:
parent
6a4994b9c2
commit
cd76f99bbf
@ -247,6 +247,8 @@ class TimetableDayFragment : Fragment(), CoroutineScope {
|
|||||||
lb.detailsFirst.text = listOfNotEmpty(timeRange, classroomInfo).concat(bullet)
|
lb.detailsFirst.text = listOfNotEmpty(timeRange, classroomInfo).concat(bullet)
|
||||||
lb.detailsSecond.text = listOfNotEmpty(teacherInfo, teamInfo).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)
|
//lb.subjectName.typeface = Typeface.create("sans-serif-light", Typeface.BOLD)
|
||||||
when (lesson.type) {
|
when (lesson.type) {
|
||||||
Lesson.TYPE_NORMAL -> {
|
Lesson.TYPE_NORMAL -> {
|
||||||
|
10
app/src/main/res/drawable/unread_red_circle.xml
Normal file
10
app/src/main/res/drawable/unread_red_circle.xml
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!--
|
||||||
|
~ Copyright (c) Kacper Ziubryniewicz 2019-11-23
|
||||||
|
-->
|
||||||
|
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:shape="oval">
|
||||||
|
<solid android:color="@color/red500"/>
|
||||||
|
<size android:width="10dp" android:height="10dp"/>
|
||||||
|
</shape>
|
@ -11,6 +11,9 @@
|
|||||||
<variable
|
<variable
|
||||||
name="lessonNumber"
|
name="lessonNumber"
|
||||||
type="Integer" />
|
type="Integer" />
|
||||||
|
<variable
|
||||||
|
name="unread"
|
||||||
|
type="boolean" />
|
||||||
</data>
|
</data>
|
||||||
<FrameLayout
|
<FrameLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@ -70,6 +73,17 @@
|
|||||||
tools:maxLines="2"
|
tools:maxLines="2"
|
||||||
tools:text="pracownia urządzeń techniki komputerowej" />
|
tools:text="pracownia urządzeń techniki komputerowej" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center_vertical"
|
||||||
|
android:paddingStart="8dp"
|
||||||
|
android:paddingLeft="8dp"
|
||||||
|
android:paddingEnd="8dp"
|
||||||
|
android:paddingRight="8dp"
|
||||||
|
android:visibility="@{unread ? View.VISIBLE : View.GONE}"
|
||||||
|
app:srcCompat="@drawable/unread_red_circle" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/attendanceIcon"
|
android:id="@+id/attendanceIcon"
|
||||||
android:layout_width="24dp"
|
android:layout_width="24dp"
|
||||||
@ -136,4 +150,4 @@
|
|||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
</layout>
|
</layout>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user