diff --git a/res/drawable/ic_backspace.xml b/res/drawable/ic_backspace.xml index bbcb90a316a59fd1ccc1a9f506ce3659f3ea5a3b..e910897941b30da5428075b192748003f5bba9f1 100644 --- a/res/drawable/ic_backspace.xml +++ b/res/drawable/ic_backspace.xml @@ -19,7 +19,7 @@ xmlns:android="http://schemas.android.com/apk/res/android" android:width="@dimen/backspace_icon_size" android:height="@dimen/backspace_icon_size" - android:tint="?attr/colorControlNormal" + android:tint="@color/accent_color" android:tintMode="src_in" android:viewportHeight="24.0" android:viewportWidth="24.0"> diff --git a/res/layout/custom_pref_dropdown_layout.xml b/res/layout/custom_pref_dropdown_layout.xml index ec13ee58cde0c3e3d05c7f01180f7c485bb25e72..6cbca8a7496a3b299234f953c232b0a9eb0cec22 100644 --- a/res/layout/custom_pref_dropdown_layout.xml +++ b/res/layout/custom_pref_dropdown_layout.xml @@ -7,6 +7,7 @@ android:gravity="center_vertical" android:paddingEnd="?android:attr/scrollbarSize" android:background="@color/default_background" + android:foreground="?android:attr/selectableItemBackground" android:focusable="true" > diff --git a/res/layout/custom_pref_layout.xml b/res/layout/custom_pref_layout.xml index a49bebf9a504641617766105d64267733a17b825..85c8467edee7fb4e78c4bbfd092e88488e562eae 100644 --- a/res/layout/custom_pref_layout.xml +++ b/res/layout/custom_pref_layout.xml @@ -7,6 +7,7 @@ android:gravity="center_vertical" android:paddingEnd="?android:attr/scrollbarSize" android:background="@color/default_background" + android:foreground="?android:attr/selectableItemBackground" android:focusable="true" > \ No newline at end of file diff --git a/res/layout/digital_widget.xml b/res/layout/digital_widget.xml index 78663f143039b19e21207db28a253a3a7d328187..5290d8470e789f835907d2879dd1cdbcb2cb4076 100644 --- a/res/layout/digital_widget.xml +++ b/res/layout/digital_widget.xml @@ -33,7 +33,7 @@ android:format24Hour="@string/lock_screen_24_hour_format" android:includeFontPadding="false" android:singleLine="true" - android:textColor="@color/color_default_primary_text" /> + android:textColor="@color/color_default_view_on_accent" /> + android:textColor="@color/color_default_view_on_accent" /> + android:textColor="@color/color_default_view_on_accent" /> diff --git a/res/layout/timer_setup_time.xml b/res/layout/timer_setup_time.xml index f770a604fa7e0d9a71402df8ffa642d31600bfd3..2c33a3ba9d03ca826d1c8be4c28f50506d16c504 100644 --- a/res/layout/timer_setup_time.xml +++ b/res/layout/timer_setup_time.xml @@ -48,8 +48,10 @@ android:layout_height="wrap_content" android:contentDescription="@string/timer_delete" android:background="@color/default_background" + android:foreground="?android:attr/selectableItemBackground" android:padding="12dp" android:scaleType="center" + android:tint="@color/accent_color" app:srcCompat="@drawable/ic_backspace" /> diff --git a/res/layout/world_clock_remote_list_item.xml b/res/layout/world_clock_remote_list_item.xml index 80ffa453786eafa1af85371bc80952c2626a7775..fa6698fa74cf0e9935659c04dbe2f2b147aa0f8d 100644 --- a/res/layout/world_clock_remote_list_item.xml +++ b/res/layout/world_clock_remote_list_item.xml @@ -17,7 +17,6 @@ @@ -43,7 +42,7 @@ android:layout_gravity="center" android:baselineAligned="true" android:gravity="center" - android:textColor="@color/color_default_primary_text" /> + android:textColor="@color/color_default_view_on_accent" /> @@ -83,7 +82,7 @@ android:includeFontPadding="false" android:singleLine="true" android:textAllCaps="true" - android:textColor="@color/color_default_primary_text" + android:textColor="@color/color_default_view_on_accent" android:textSize="@dimen/city_widget_name_font_size" /> @@ -105,7 +104,7 @@ android:layout_gravity="center" android:baselineAligned="true" android:gravity="center" - android:textColor="@color/color_default_primary_text" /> + android:textColor="@color/color_default_view_on_accent" /> @@ -145,7 +144,7 @@ android:includeFontPadding="false" android:singleLine="true" android:textAllCaps="true" - android:textColor="@color/color_default_primary_text" + android:textColor="@color/color_default_view_on_accent" android:textSize="@dimen/city_widget_name_font_size" /> diff --git a/res/values/colors.xml b/res/values/colors.xml index 5968fd63f59aeaa5093adb4bacf0224d81bae093..cbf097ff431096d4d8bc8b7c4f8dc77855a1c63b 100644 --- a/res/values/colors.xml +++ b/res/values/colors.xml @@ -34,6 +34,7 @@ @lineageos.platform:color/color_default_primary_text @lineageos.platform:color/color_default_secondary_text @lineageos.platform:color/color_default_divider + @lineageos.platform:color/color_default_view_on_accent @lineageos.platform:color/color_default_gray1 @lineageos.platform:color/color_default_gray2 diff --git a/res/values/styles.xml b/res/values/styles.xml index d2e540016622ee53394278e04589f1088b0bb728..4bb82113fc67cdfb8db5d55a21c222a3fce9caae 100644 --- a/res/values/styles.xml +++ b/res/values/styles.xml @@ -159,6 +159,7 @@ @color/transparent @color/transparent @color/accent_color + @color/accent_color diff --git a/src/com/android/deskclock/DeskClockApplication.java b/src/com/android/deskclock/DeskClockApplication.java index 395d385180ca50c0ba0e578dc5ab15d1d056316f..3f2afb32a29baff2e7529bc023b080f967393e51 100644 --- a/src/com/android/deskclock/DeskClockApplication.java +++ b/src/com/android/deskclock/DeskClockApplication.java @@ -28,12 +28,16 @@ import com.android.deskclock.data.DataModel; import com.android.deskclock.events.LogEventTracker; import com.android.deskclock.uidata.UiDataModel; +import androidx.appcompat.app.AppCompatDelegate; + public class DeskClockApplication extends Application { @Override public void onCreate() { super.onCreate(); + AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES); + final Context applicationContext = getApplicationContext(); final SharedPreferences prefs = getDefaultSharedPreferences(applicationContext); diff --git a/src/com/android/deskclock/alarms/dataadapter/ExpandedAlarmViewHolder.java b/src/com/android/deskclock/alarms/dataadapter/ExpandedAlarmViewHolder.java index 9a07bd4840c2287f5c54c21fab487b87a87116a5..f6db75ac764e549a048675186e773424df850dd2 100644 --- a/src/com/android/deskclock/alarms/dataadapter/ExpandedAlarmViewHolder.java +++ b/src/com/android/deskclock/alarms/dataadapter/ExpandedAlarmViewHolder.java @@ -101,6 +101,7 @@ public final class ExpandedAlarmViewHolder extends AlarmItemViewHolder { final int weekday = weekdays.get(i); dayButton.setText(UiDataModel.getUiDataModel().getShortWeekday(weekday)); dayButton.setContentDescription(UiDataModel.getUiDataModel().getLongWeekday(weekday)); + dayButton.setTextColor(context.getApplicationContext().getResources().getColor(R.color.color_default_view_on_accent)); repeatDays.addView(dayButtonFrame); dayButtons[i] = dayButton; } @@ -221,11 +222,10 @@ public final class ExpandedAlarmViewHolder extends AlarmItemViewHolder { final CompoundButton dayButton = dayButtons[i]; if (alarm.daysOfWeek.isBitOn(weekdays.get(i))) { dayButton.setChecked(true); - dayButton.setTextColor(ThemeUtils.resolveColor(context, - android.R.attr.windowBackground)); + dayButton.setTextColor(context.getApplicationContext().getResources().getColor(R.color.color_default_view_on_accent)); } else { dayButton.setChecked(false); - dayButton.setTextColor(context.getApplicationContext().getResources().getColor(R.color.color_default_primary_text)); + dayButton.setTextColor(context.getApplicationContext().getResources().getColor(R.color.color_default_view_on_accent)); } } if (alarm.daysOfWeek.isRepeating()) { diff --git a/src/com/android/deskclock/stopwatch/StopwatchCircleView.java b/src/com/android/deskclock/stopwatch/StopwatchCircleView.java index 8f010bd70670cea77f4f2333dfd578f9fcd98691..297fd9a0aeaa376d6d5c903416725086c7bd0fe8 100644 --- a/src/com/android/deskclock/stopwatch/StopwatchCircleView.java +++ b/src/com/android/deskclock/stopwatch/StopwatchCircleView.java @@ -81,7 +81,7 @@ public final class StopwatchCircleView extends View { mMarkerStrokeSize = resources.getDimension(R.dimen.circletimer_marker_size); mRadiusOffset = Utils.calculateRadiusOffset(mStrokeSize, dotDiameter, mMarkerStrokeSize); - mRemainderColor = context.getApplicationContext().getResources().getColor(R.color.gray1); + mRemainderColor = ThemeUtils.resolveColor(context, R.attr.colorAccent); mCompletedColor = ThemeUtils.resolveColor(context, R.attr.colorAccent); mPaint.setAntiAlias(true); @@ -108,6 +108,7 @@ public final class StopwatchCircleView extends View { // Reset old painting state. mPaint.setColor(mRemainderColor); + mPaint.setAlpha(100); mPaint.setStrokeWidth(mStrokeSize); final List laps = getLaps(); diff --git a/src/com/android/deskclock/timer/TimerCircleView.java b/src/com/android/deskclock/timer/TimerCircleView.java index 2a3012e1191f4d58e1f61752d45ceb1ff706f465..c55cc88e4950e0b90bb0f98e5ae405834cb22edf 100644 --- a/src/com/android/deskclock/timer/TimerCircleView.java +++ b/src/com/android/deskclock/timer/TimerCircleView.java @@ -71,7 +71,7 @@ public final class TimerCircleView extends View { mStrokeSize = resources.getDimension(R.dimen.circletimer_circle_size); mRadiusOffset = Utils.calculateRadiusOffset(mStrokeSize, dotDiameter, 0); - mRemainderColor = context.getApplicationContext().getResources().getColor(R.color.gray1); + mRemainderColor = ThemeUtils.resolveColor(context, R.attr.colorAccent); mCompletedColor = ThemeUtils.resolveColor(context, R.attr.colorAccent); mPaint.setAntiAlias(true); @@ -102,6 +102,7 @@ public final class TimerCircleView extends View { // Reset old painting state. mPaint.setColor(mRemainderColor); + mPaint.setAlpha(100); mPaint.setStrokeWidth(mStrokeSize); // If the timer is reset, draw a simple white circle.