From a84a733fc72d71a3991b5d5e3d9390fc724d00c5 Mon Sep 17 00:00:00 2001 From: TheScarastic Date: Tue, 29 Mar 2022 13:56:17 +0530 Subject: pvc: Add support for dark mode --- .../privacycentralapp/common/NavToolbarFragment.kt | 1 - app/src/main/res/drawable/ic_back_24dp.xml | 27 ++++++++++++++++++++++ .../main/res/drawable/ic_chevron_right_24dp.xml | 2 +- .../main/res/drawable/ic_ic_chevron_left_24dp.xml | 10 -------- app/src/main/res/drawable/ic_shield_off.xml | 7 +++--- app/src/main/res/layout/apptrackers_fragment.xml | 2 +- app/src/main/res/layout/fragment_dashboard.xml | 2 +- app/src/main/res/layout/fragment_fake_location.xml | 2 +- .../layout/fragment_internet_activity_policy.xml | 3 +-- app/src/main/res/layout/fragment_trackers.xml | 2 +- app/src/main/res/layout/topbar.xml | 2 +- app/src/main/res/values-night/bools.xml | 20 ++++++++++++++++ app/src/main/res/values-night/colors.xml | 22 ++++++++++++++++++ app/src/main/res/values/bools.xml | 20 ++++++++++++++++ app/src/main/res/values/colors.xml | 10 ++++---- app/src/main/res/values/themes.xml | 7 +++++- 16 files changed, 110 insertions(+), 29 deletions(-) create mode 100644 app/src/main/res/drawable/ic_back_24dp.xml delete mode 100644 app/src/main/res/drawable/ic_ic_chevron_left_24dp.xml create mode 100644 app/src/main/res/values-night/bools.xml create mode 100644 app/src/main/res/values-night/colors.xml create mode 100644 app/src/main/res/values/bools.xml (limited to 'app') diff --git a/app/src/main/java/foundation/e/privacycentralapp/common/NavToolbarFragment.kt b/app/src/main/java/foundation/e/privacycentralapp/common/NavToolbarFragment.kt index 5930fff..c28c871 100644 --- a/app/src/main/java/foundation/e/privacycentralapp/common/NavToolbarFragment.kt +++ b/app/src/main/java/foundation/e/privacycentralapp/common/NavToolbarFragment.kt @@ -26,7 +26,6 @@ abstract class NavToolbarFragment(@LayoutRes contentLayoutId: Int) : ToolbarFrag override fun setupToolbar(toolbar: MaterialToolbar) { super.setupToolbar(toolbar) toolbar.apply { - setNavigationIcon(R.drawable.ic_ic_chevron_left_24dp) setNavigationOnClickListener { requireActivity().onBackPressed() } diff --git a/app/src/main/res/drawable/ic_back_24dp.xml b/app/src/main/res/drawable/ic_back_24dp.xml new file mode 100644 index 0000000..ec67587 --- /dev/null +++ b/app/src/main/res/drawable/ic_back_24dp.xml @@ -0,0 +1,27 @@ + + + + + diff --git a/app/src/main/res/drawable/ic_chevron_right_24dp.xml b/app/src/main/res/drawable/ic_chevron_right_24dp.xml index c0a38c1..28f1352 100644 --- a/app/src/main/res/drawable/ic_chevron_right_24dp.xml +++ b/app/src/main/res/drawable/ic_chevron_right_24dp.xml @@ -21,7 +21,7 @@ android:width="24dp" android:viewportHeight="24.0" android:viewportWidth="24.0" - android:tint="#000"> + android:tint="@color/iconInvertedColor"> diff --git a/app/src/main/res/drawable/ic_ic_chevron_left_24dp.xml b/app/src/main/res/drawable/ic_ic_chevron_left_24dp.xml deleted file mode 100644 index e88ab33..0000000 --- a/app/src/main/res/drawable/ic_ic_chevron_left_24dp.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - diff --git a/app/src/main/res/drawable/ic_shield_off.xml b/app/src/main/res/drawable/ic_shield_off.xml index 7c2fc8e..8f811a2 100644 --- a/app/src/main/res/drawable/ic_shield_off.xml +++ b/app/src/main/res/drawable/ic_shield_off.xml @@ -2,14 +2,15 @@ android:width="24dp" android:height="24dp" android:viewportWidth="24" - android:viewportHeight="24"> + android:viewportHeight="24" + android:tint="@color/red_off"> + android:strokeColor="#000000"/> diff --git a/app/src/main/res/layout/apptrackers_fragment.xml b/app/src/main/res/layout/apptrackers_fragment.xml index 87fbc51..b0b9e71 100644 --- a/app/src/main/res/layout/apptrackers_fragment.xml +++ b/app/src/main/res/layout/apptrackers_fragment.xml @@ -22,7 +22,7 @@ diff --git a/app/src/main/res/layout/fragment_dashboard.xml b/app/src/main/res/layout/fragment_dashboard.xml index ec69575..83932b1 100644 --- a/app/src/main/res/layout/fragment_dashboard.xml +++ b/app/src/main/res/layout/fragment_dashboard.xml @@ -15,7 +15,7 @@ > diff --git a/app/src/main/res/layout/fragment_internet_activity_policy.xml b/app/src/main/res/layout/fragment_internet_activity_policy.xml index 943c5dd..328eeae 100644 --- a/app/src/main/res/layout/fragment_internet_activity_policy.xml +++ b/app/src/main/res/layout/fragment_internet_activity_policy.xml @@ -2,8 +2,7 @@ diff --git a/app/src/main/res/layout/fragment_trackers.xml b/app/src/main/res/layout/fragment_trackers.xml index 04fcfb1..2122816 100644 --- a/app/src/main/res/layout/fragment_trackers.xml +++ b/app/src/main/res/layout/fragment_trackers.xml @@ -3,7 +3,7 @@ diff --git a/app/src/main/res/layout/topbar.xml b/app/src/main/res/layout/topbar.xml index 90fb29a..eaebce1 100644 --- a/app/src/main/res/layout/topbar.xml +++ b/app/src/main/res/layout/topbar.xml @@ -31,7 +31,7 @@ android:id="@+id/toolbar" android:layout_height="?android:attr/actionBarSize" android:layout_width="match_parent" - app:titleCentered="true" tools:layout_height="56dp" + app:navigationIcon="@drawable/ic_back_24dp" /> diff --git a/app/src/main/res/values-night/bools.xml b/app/src/main/res/values-night/bools.xml new file mode 100644 index 0000000..179bb0e --- /dev/null +++ b/app/src/main/res/values-night/bools.xml @@ -0,0 +1,20 @@ + + + + false + diff --git a/app/src/main/res/values-night/colors.xml b/app/src/main/res/values-night/colors.xml new file mode 100644 index 0000000..bbf2357 --- /dev/null +++ b/app/src/main/res/values-night/colors.xml @@ -0,0 +1,22 @@ + + + + + #FFFFFF + #169659 + diff --git a/app/src/main/res/values/bools.xml b/app/src/main/res/values/bools.xml new file mode 100644 index 0000000..bdf8531 --- /dev/null +++ b/app/src/main/res/values/bools.xml @@ -0,0 +1,20 @@ + + + + true + diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml index 1ffc641..b77a233 100644 --- a/app/src/main/res/values/colors.xml +++ b/app/src/main/res/values/colors.xml @@ -7,17 +7,15 @@ @lineageos.platform:color/color_default_primary_text @lineageos.platform:color/color_default_secondary_text - - - - @lineageos.platform:color/color_default_red1 - + @lineageos.platform:color/color_default_background + #000000 #263238 #FFFFFFFF #66FFFFFF - #2CC766 + #28C97C + #F8432E #AADCFE #14212121 diff --git a/app/src/main/res/values/themes.xml b/app/src/main/res/values/themes.xml index 9bc2442..60cd9e4 100644 --- a/app/src/main/res/values/themes.xml +++ b/app/src/main/res/values/themes.xml @@ -6,10 +6,15 @@ @color/accent + @color/primary + @color/primary + @color/primary + @bool/is_day + @bool/is_day + @color/primary_text 16sp - \ No newline at end of file -- cgit v1.2.1