mirror of
https://github.com/SimpleMobileTools/Simple-Calendar.git
synced 2025-06-05 21:59:17 +02:00
use rounded corneres at the current day too
This commit is contained in:
@@ -170,10 +170,12 @@ class MyWidgetMonthlyProvider : AppWidgetProvider() {
|
|||||||
setTextSize(R.id.day_monthly_number_id, context.getWidgetFontSize() - 3f)
|
setTextSize(R.id.day_monthly_number_id, context.getWidgetFontSize() - 3f)
|
||||||
|
|
||||||
if (day.isToday) {
|
if (day.isToday) {
|
||||||
setBackgroundColor(R.id.day_monthly_number_id, textColor)
|
|
||||||
setTextColor(R.id.day_monthly_number_id, textColor.getContrastColor())
|
setTextColor(R.id.day_monthly_number_id, textColor.getContrastColor())
|
||||||
|
setViewVisibility(R.id.day_monthly_number_background, View.VISIBLE)
|
||||||
|
setInt(R.id.day_monthly_number_background, "setColorFilter", textColor)
|
||||||
} else {
|
} else {
|
||||||
setTextColor(R.id.day_monthly_number_id, textColor)
|
setTextColor(R.id.day_monthly_number_id, textColor)
|
||||||
|
setViewVisibility(R.id.day_monthly_number_background, View.GONE)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
views.addView(id, newRemoteView)
|
views.addView(id, newRemoteView)
|
||||||
|
@@ -1,15 +1,32 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
|
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:id="@+id/day_monthly_number_id"
|
android:id="@+id/day_monthly_number_holder"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content">
|
||||||
android:layout_marginStart="@dimen/tiny_margin"
|
|
||||||
android:layout_marginEnd="@dimen/tiny_margin"
|
<ImageView
|
||||||
android:ellipsize="none"
|
android:id="@+id/day_monthly_number_background"
|
||||||
android:gravity="center_horizontal"
|
android:layout_width="match_parent"
|
||||||
android:maxLines="1"
|
android:layout_height="match_parent"
|
||||||
android:paddingStart="@dimen/tiny_margin"
|
android:layout_alignBottom="@+id/day_monthly_number_id"
|
||||||
android:paddingEnd="@dimen/tiny_margin"
|
android:layout_margin="@dimen/one_dp"
|
||||||
android:textSize="@dimen/normal_text_size"
|
android:contentDescription="@null"
|
||||||
tools:text="1" />
|
android:src="@drawable/day_monthly_event_background_widget"
|
||||||
|
android:visibility="gone" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/day_monthly_number_id"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="@dimen/tiny_margin"
|
||||||
|
android:layout_marginEnd="@dimen/tiny_margin"
|
||||||
|
android:ellipsize="none"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:paddingStart="@dimen/tiny_margin"
|
||||||
|
android:paddingEnd="@dimen/tiny_margin"
|
||||||
|
android:textSize="@dimen/normal_text_size"
|
||||||
|
tools:text="1" />
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
Reference in New Issue
Block a user