From d10b19751430dfc4c9b926acef19313252da2ea2 Mon Sep 17 00:00:00 2001 From: Andreas Schildbach Date: Sun, 7 Feb 2021 17:04:22 +0100 Subject: [PATCH] TripsOverviewActivity: Switch back to dark mode by default for up to Android 9 devices. --- oeffi/AndroidManifest.xml | 3 ++- oeffi/res/values-notnight-v29/colors.xml | 6 ++++++ oeffi/res/values-notnight-v29/dimens.xml | 6 ++++++ oeffi/res/values-notnight-v29/styes.xml | 18 ++++++++++++++++++ oeffi/res/values/colors.xml | 8 +++++++- oeffi/res/values/dimens.xml | 1 + oeffi/res/values/styles.xml | 8 ++++++++ .../oeffi/directions/TripsGallery.java | 10 +++++----- .../oeffi/directions/TripsGalleryAdapter.java | 17 +++++++++++------ .../directions/TripsOverviewActivity.java | 2 +- 10 files changed, 65 insertions(+), 14 deletions(-) create mode 100644 oeffi/res/values-notnight-v29/dimens.xml create mode 100644 oeffi/res/values-notnight-v29/styes.xml diff --git a/oeffi/AndroidManifest.xml b/oeffi/AndroidManifest.xml index 8b41ab3..c31aacf 100644 --- a/oeffi/AndroidManifest.xml +++ b/oeffi/AndroidManifest.xml @@ -486,7 +486,8 @@ + android:taskAffinity="de.schildbach.oeffi.directions" + android:theme="@style/My.Theme.DarkDefault" /> #000000 + #ffffff #777777 + #bbbbbb #dd9055 #f7f7f7 + #227722 + #cccccc + #cccccc + #cc9900 #757575 #ffaaaa diff --git a/oeffi/res/values-notnight-v29/dimens.xml b/oeffi/res/values-notnight-v29/dimens.xml new file mode 100644 index 0000000..b2a0e1b --- /dev/null +++ b/oeffi/res/values-notnight-v29/dimens.xml @@ -0,0 +1,6 @@ + + + + 2dp + + diff --git a/oeffi/res/values-notnight-v29/styes.xml b/oeffi/res/values-notnight-v29/styes.xml new file mode 100644 index 0000000..6cf7297 --- /dev/null +++ b/oeffi/res/values-notnight-v29/styes.xml @@ -0,0 +1,18 @@ + + + + + + + + diff --git a/oeffi/res/values/colors.xml b/oeffi/res/values/colors.xml index 1780199..dd27815 100644 --- a/oeffi/res/values/colors.xml +++ b/oeffi/res/values/colors.xml @@ -3,11 +3,13 @@ #000000 - #ffffff #ffffff + #ffffff + #000000 #777777 #aaaaaa #bbbbbb + #888888 #dd9055 #ff9966 #aa0000 @@ -23,11 +25,15 @@ #555555 #777700 #227722 + #114411 #cccccc #ffcfffaf #cccccc + #444444 #cccccc + #444444 #cc9900 + #ffff00 #757575 #bbbbbb #ff4444 diff --git a/oeffi/res/values/dimens.xml b/oeffi/res/values/dimens.xml index fef3c7f..37c3a3f 100644 --- a/oeffi/res/values/dimens.xml +++ b/oeffi/res/values/dimens.xml @@ -27,6 +27,7 @@ 48dp 32dp 2dp + 1dp 72dp 80% diff --git a/oeffi/res/values/styles.xml b/oeffi/res/values/styles.xml index be74187..727a1f6 100644 --- a/oeffi/res/values/styles.xml +++ b/oeffi/res/values/styles.xml @@ -16,6 +16,14 @@ @style/My.Widget.PopupMenu + +