From 69f3d85be308741d73ea34069c6760f3a7a90fbe Mon Sep 17 00:00:00 2001 From: Andreas Schildbach Date: Sun, 10 Jan 2021 19:56:15 +0100 Subject: [PATCH] Dark mode. --- oeffi/AndroidManifest.xml | 5 +- oeffi/res/drawable/disclaimer_background.xml | 15 ------ oeffi/res/drawable/list_divider.xml | 8 ++++ oeffi/res/drawable/list_entry_background.xml | 4 +- oeffi/res/layout/directions_content.xml | 2 +- .../directions_location_dropdown_entry.xml | 2 + oeffi/res/layout/directions_map_pin.xml | 9 ++-- .../layout/directions_query_history_entry.xml | 3 ++ .../directions_trip_details_content.xml | 8 ++-- ...rections_trip_details_individual_entry.xml | 3 +- .../directions_trip_details_public_entry.xml | 3 +- .../directions_trip_overview_content.xml | 4 -- oeffi/res/layout/navigation_drawer.xml | 2 +- oeffi/res/layout/network_picker_separator.xml | 4 +- oeffi/res/layout/plans_picker_content.xml | 4 +- oeffi/res/layout/plans_picker_entry.xml | 10 ++-- oeffi/res/layout/stations_content.xml | 5 +- .../stations_station_details_content.xml | 1 - .../stations_station_details_header.xml | 2 +- oeffi/res/values-night/colors.xml | 28 +++++++++++ oeffi/res/values-night/styles.xml | 47 +++++++++++++++++++ oeffi/res/values/colors.xml | 15 ++++-- oeffi/res/values/styles.xml | 17 ++++--- oeffi/src/de/schildbach/oeffi/Constants.java | 3 -- .../oeffi/directions/DirectionsActivity.java | 4 +- .../oeffi/directions/PearlView.java | 9 ++-- .../oeffi/directions/TripDetailsActivity.java | 10 ++-- .../oeffi/directions/TripsGallery.java | 9 ++-- .../oeffi/directions/TripsGalleryAdapter.java | 14 +++--- .../directions/TripsOverviewActivity.java | 2 +- .../oeffi/network/list/NetworkViewHolder.java | 8 ++-- .../schildbach/oeffi/util/DialogBuilder.java | 3 +- .../oeffi/util/DividerItemDecoration.java | 8 +--- .../schildbach/oeffi/util/MultiDrawable.java | 2 + 34 files changed, 178 insertions(+), 95 deletions(-) delete mode 100644 oeffi/res/drawable/disclaimer_background.xml create mode 100644 oeffi/res/drawable/list_divider.xml create mode 100644 oeffi/res/values-night/colors.xml create mode 100644 oeffi/res/values-night/styles.xml diff --git a/oeffi/AndroidManifest.xml b/oeffi/AndroidManifest.xml index e152d9e..f0437ba 100644 --- a/oeffi/AndroidManifest.xml +++ b/oeffi/AndroidManifest.xml @@ -63,7 +63,7 @@ android:icon="@mipmap/ic_oeffi_stations_color_48dp" android:label="@string/app_name" android:networkSecurityConfig="@xml/network_security_config" - android:theme="@style/My.Theme.Light"> + android:theme="@style/My.Theme"> + android:taskAffinity="de.schildbach.oeffi.directions" /> - - - - - - - - - diff --git a/oeffi/res/drawable/list_divider.xml b/oeffi/res/drawable/list_divider.xml new file mode 100644 index 0000000..65f7aaf --- /dev/null +++ b/oeffi/res/drawable/list_divider.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/oeffi/res/drawable/list_entry_background.xml b/oeffi/res/drawable/list_entry_background.xml index 7860976..bb3c6f0 100644 --- a/oeffi/res/drawable/list_entry_background.xml +++ b/oeffi/res/drawable/list_entry_background.xml @@ -5,14 +5,14 @@ - + - + diff --git a/oeffi/res/layout/directions_content.xml b/oeffi/res/layout/directions_content.xml index 7167165..ac7a732 100644 --- a/oeffi/res/layout/directions_content.xml +++ b/oeffi/res/layout/directions_content.xml @@ -87,7 +87,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_gravity="top" - android:background="@android:color/white" + android:background="@color/bg_level1" android:elevation="@dimen/elevation_panel"> diff --git a/oeffi/res/layout/directions_location_dropdown_entry.xml b/oeffi/res/layout/directions_location_dropdown_entry.xml index 5061a6f..090a74f 100644 --- a/oeffi/res/layout/directions_location_dropdown_entry.xml +++ b/oeffi/res/layout/directions_location_dropdown_entry.xml @@ -4,7 +4,9 @@ style="?android:attr/dropDownItemStyle" android:layout_width="match_parent" android:layout_height="wrap_content" + android:background="@color/bg_level0" android:drawablePadding="@dimen/list_entry_padding_horizontal_lax" + android:drawableTint="@color/fg_less_significant" android:minHeight="52dp" android:paddingLeft="@dimen/list_entry_padding_horizontal_lax" android:textSize="@dimen/font_size_large" /> diff --git a/oeffi/res/layout/directions_map_pin.xml b/oeffi/res/layout/directions_map_pin.xml index d20b26c..eb26496 100644 --- a/oeffi/res/layout/directions_map_pin.xml +++ b/oeffi/res/layout/directions_map_pin.xml @@ -17,7 +17,8 @@ android:gravity="left" android:paddingBottom="@dimen/list_entry_padding_vertical" android:paddingLeft="@dimen/list_entry_padding_horizontal" - android:paddingRight="@dimen/list_entry_padding_horizontal" /> + android:paddingRight="@dimen/list_entry_padding_horizontal" + android:textColor="@color/fg_significant_on_light" /> + android:text="@string/directions_map_pin_button_from" + android:textColor="@color/fg_significant_on_light" />