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)
|
||||
|
||||
if (day.isToday) {
|
||||
setBackgroundColor(R.id.day_monthly_number_id, textColor)
|
||||
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 {
|
||||
setTextColor(R.id.day_monthly_number_id, textColor)
|
||||
setViewVisibility(R.id.day_monthly_number_background, View.GONE)
|
||||
}
|
||||
}
|
||||
views.addView(id, newRemoteView)
|
||||
|
@@ -1,6 +1,21 @@
|
||||
<?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"
|
||||
android:id="@+id/day_monthly_number_holder"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/day_monthly_number_background"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignBottom="@+id/day_monthly_number_id"
|
||||
android:layout_margin="@dimen/one_dp"
|
||||
android:contentDescription="@null"
|
||||
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"
|
||||
@@ -13,3 +28,5 @@
|
||||
android:paddingEnd="@dimen/tiny_margin"
|
||||
android:textSize="@dimen/normal_text_size"
|
||||
tools:text="1" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
Reference in New Issue
Block a user