use rounded background at the monthly view widget
This commit is contained in:
parent
4093e7fb60
commit
975fe7ff58
2 changed files with 10 additions and 1 deletions
|
@ -149,9 +149,9 @@ class MyWidgetMonthlyProvider : AppWidgetProvider() {
|
|||
setText(R.id.day_monthly_event_id, it.title.replace(" ", "\u00A0"))
|
||||
setTextColor(R.id.day_monthly_event_id, eventTextColor)
|
||||
setTextSize(R.id.day_monthly_event_id, smallerFontSize - 3f)
|
||||
setBackgroundColor(R.id.day_monthly_event_holder, backgroundColor)
|
||||
setVisibleIf(R.id.day_monthly_task_image, it.isTask())
|
||||
applyColorFilter(R.id.day_monthly_task_image, eventTextColor)
|
||||
setInt(R.id.day_monthly_event_background, "setColorFilter", backgroundColor)
|
||||
|
||||
if (it.isTaskCompleted()) {
|
||||
setInt(R.id.day_monthly_event_id, "setPaintFlags", Paint.ANTI_ALIAS_FLAG or Paint.STRIKE_THRU_TEXT_FLAG)
|
||||
|
|
|
@ -5,6 +5,15 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/day_monthly_event_background"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignBottom="@+id/day_monthly_event_id"
|
||||
android:layout_margin="@dimen/one_dp"
|
||||
android:contentDescription="@null"
|
||||
android:src="@drawable/day_monthly_event_background_widget" />
|
||||
|
||||
<!-- widgets cannot contain ConstraintLayout and image scaling doesn't work well, so set its size -->
|
||||
<ImageView
|
||||
android:id="@+id/day_monthly_task_image"
|
||||
|
|
Loading…
Reference in a new issue