From 7c93796a0f2a59d3fa3426fc1b4678b7cbfd9ee4 Mon Sep 17 00:00:00 2001 From: Andreas Schildbach Date: Wed, 3 Feb 2021 15:03:29 +0100 Subject: [PATCH] For Android 10 and later, add light mode to appwidget. --- oeffi/res/layout/station_widget_content.xml | 10 +++++----- oeffi/res/layout/station_widget_entry.xml | 18 +++++++++--------- .../layout/station_widget_entry_loading.xml | 2 +- oeffi/res/values-notnight-v29/colors.xml | 14 ++++++++++++++ oeffi/res/values/colors.xml | 6 ++++++ 5 files changed, 35 insertions(+), 15 deletions(-) create mode 100644 oeffi/res/values-notnight-v29/colors.xml diff --git a/oeffi/res/layout/station_widget_content.xml b/oeffi/res/layout/station_widget_content.xml index 9685f48..413ae65 100644 --- a/oeffi/res/layout/station_widget_content.xml +++ b/oeffi/res/layout/station_widget_content.xml @@ -4,7 +4,7 @@ android:id="@+id/station_widget_content" android:layout_width="match_parent" android:layout_height="match_parent" - android:background="#ff202020" + android:background="@color/bg_level0_darkdefault" android:focusable="true" android:orientation="vertical"> @@ -22,7 +22,7 @@ android:layout_alignParentLeft="true" android:layout_margin="2dp" android:singleLine="true" - android:textColor="#888" + android:textColor="@color/fg_less_significant_darkdefault" android:textStyle="bold" /> @@ -70,7 +70,7 @@ android:layout_marginLeft="24dp" android:layout_marginRight="24dp" android:gravity="center" - android:textColor="#fff" + android:textColor="@color/fg_significant_darkdefault" android:textStyle="bold" android:visibility="gone" /> diff --git a/oeffi/res/layout/station_widget_entry.xml b/oeffi/res/layout/station_widget_entry.xml index 6ea33e1..69b608a 100644 --- a/oeffi/res/layout/station_widget_entry.xml +++ b/oeffi/res/layout/station_widget_entry.xml @@ -15,10 +15,10 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_margin="2dp" - android:background="#666" + android:background="@color/bg_divider" android:paddingLeft="3dp" android:paddingRight="3dp" - android:textColor="#fff" + android:textColor="@color/fg_significant_darkdefault" android:textStyle="bold" /> + android:textColor="@color/fg_significant_darkdefault" /> @@ -51,11 +51,11 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_margin="2dp" - android:background="#bbb" + android:background="@color/bg_position_darkdefault" android:paddingLeft="3dp" android:paddingRight="3dp" android:singleLine="true" - android:textColor="#000" + android:textColor="@color/bg_level0_darkdefault" android:textStyle="bold" android:visibility="gone" /> @@ -65,7 +65,7 @@ android:layout_height="wrap_content" android:layout_margin="2dp" android:singleLine="true" - android:textColor="#f55" + android:textColor="@color/fg_highlighted_darkdefault" android:textStyle="bold" android:visibility="gone" /> @@ -75,6 +75,6 @@ android:layout_height="wrap_content" android:layout_margin="2dp" android:singleLine="true" - android:textColor="#fff" /> + android:textColor="@color/fg_significant_darkdefault" /> diff --git a/oeffi/res/layout/station_widget_entry_loading.xml b/oeffi/res/layout/station_widget_entry_loading.xml index 0fed0a0..7b55718 100644 --- a/oeffi/res/layout/station_widget_entry_loading.xml +++ b/oeffi/res/layout/station_widget_entry_loading.xml @@ -7,4 +7,4 @@ android:gravity="center_horizontal" android:singleLine="true" android:text="" - android:textColor="#888" /> + android:textColor="@color/fg_less_significant_darkdefault" /> diff --git a/oeffi/res/values-notnight-v29/colors.xml b/oeffi/res/values-notnight-v29/colors.xml new file mode 100644 index 0000000..b655926 --- /dev/null +++ b/oeffi/res/values-notnight-v29/colors.xml @@ -0,0 +1,14 @@ + + + + + #000000 + #999999 + #dd9055 + + + #f7f7f7 + #757575 + #ffaaaa + + diff --git a/oeffi/res/values/colors.xml b/oeffi/res/values/colors.xml index c977528..af73168 100644 --- a/oeffi/res/values/colors.xml +++ b/oeffi/res/values/colors.xml @@ -3,9 +3,12 @@ #000000 + #ffffff #999999 + #aaaaaa #bbbbbb #dd9055 + #ff9966 #aa0000 #ffffff #ffffff @@ -13,6 +16,7 @@ #f7f7f7 + #222222 #ffffff #dddddd #555555 @@ -24,6 +28,8 @@ #cccccc #eebb00 #757575 + #bbbbbb + #ff4444 #44000000 @android:color/black #44000000