From 765eac52517985dc8662adb0cc197f32495bdafd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Borcz?= Date: Fri, 14 Dec 2018 22:36:21 +0100 Subject: [PATCH] Fix blank number and change strikethrough lesson in widget (#198) --- .../timetable/TimetableWidgetFactory.kt | 2 +- .../main/res/layout/item_widget_timetable.xml | 18 ++++++++++++++---- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/io/github/wulkanowy/ui/widgets/timetable/TimetableWidgetFactory.kt b/app/src/main/java/io/github/wulkanowy/ui/widgets/timetable/TimetableWidgetFactory.kt index de0913e8..fecdc42e 100644 --- a/app/src/main/java/io/github/wulkanowy/ui/widgets/timetable/TimetableWidgetFactory.kt +++ b/app/src/main/java/io/github/wulkanowy/ui/widgets/timetable/TimetableWidgetFactory.kt @@ -78,7 +78,7 @@ class TimetableWidgetFactory( setTextViewText(R.id.timetableWidgetItemDescription, it.info.capitalize()) } else setViewVisibility(R.id.timetableWidgetItemDescription, GONE) - if (it.changes) { + if (it.canceled) { setInt(R.id.timetableWidgetItemSubject, "setPaintFlags", STRIKE_THRU_TEXT_FLAG or ANTI_ALIAS_FLAG) } else { diff --git a/app/src/main/res/layout/item_widget_timetable.xml b/app/src/main/res/layout/item_widget_timetable.xml index 2351e0b6..2007b323 100644 --- a/app/src/main/res/layout/item_widget_timetable.xml +++ b/app/src/main/res/layout/item_widget_timetable.xml @@ -1,5 +1,6 @@ + android:maxLines="1" + android:textColor="@android:color/black" + android:textSize="25sp" + tools:text="0" />