From eda8c89b5641ccfdb450a13961c0a29347271c33 Mon Sep 17 00:00:00 2001 From: fgerber Date: Thu, 11 Apr 2024 14:56:22 +0200 Subject: [PATCH] Make light mode look nicer --- .../net/helcel/beans/activity/MainActivity.kt | 1 - .../java/net/helcel/beans/helper/Theme.kt | 1 - app/src/main/res/drawable/back.xml | 5 +++++ app/src/main/res/drawable/color.xml | 2 +- app/src/main/res/drawable/edit.xml | 2 +- app/src/main/res/values/themes.xml | 22 +++++++++++++++++-- 6 files changed, 27 insertions(+), 6 deletions(-) create mode 100644 app/src/main/res/drawable/back.xml diff --git a/app/src/main/java/net/helcel/beans/activity/MainActivity.kt b/app/src/main/java/net/helcel/beans/activity/MainActivity.kt index 3af6e62..69225ea 100644 --- a/app/src/main/java/net/helcel/beans/activity/MainActivity.kt +++ b/app/src/main/java/net/helcel/beans/activity/MainActivity.kt @@ -49,7 +49,6 @@ class MainActivity : AppCompatActivity() { super.onCreate(savedInstanceState) _binding = ActivityMainBinding.inflate(layoutInflater) Settings.start(this) - supportActionBar?.setBackgroundDrawable(colorWrapper(this, android.R.attr.colorPrimary)) setContentView(_binding.root) diff --git a/app/src/main/java/net/helcel/beans/helper/Theme.kt b/app/src/main/java/net/helcel/beans/helper/Theme.kt index 5e2f014..f3897f6 100644 --- a/app/src/main/java/net/helcel/beans/helper/Theme.kt +++ b/app/src/main/java/net/helcel/beans/helper/Theme.kt @@ -29,7 +29,6 @@ object Theme { } fun createActionBar(ctx: AppCompatActivity, title: String) { - ctx.supportActionBar?.setBackgroundDrawable(colorWrapper(ctx, android.R.attr.colorPrimary)) ctx.supportActionBar?.title = title ctx.supportActionBar?.setDisplayHomeAsUpEnabled(true) } diff --git a/app/src/main/res/drawable/back.xml b/app/src/main/res/drawable/back.xml new file mode 100644 index 0000000..6e18b25 --- /dev/null +++ b/app/src/main/res/drawable/back.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/app/src/main/res/drawable/color.xml b/app/src/main/res/drawable/color.xml index 90e9872..5fa2d9c 100644 --- a/app/src/main/res/drawable/color.xml +++ b/app/src/main/res/drawable/color.xml @@ -5,6 +5,6 @@ android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android"> diff --git a/app/src/main/res/drawable/edit.xml b/app/src/main/res/drawable/edit.xml index c4b2d4b..5cd1ea2 100644 --- a/app/src/main/res/drawable/edit.xml +++ b/app/src/main/res/drawable/edit.xml @@ -5,6 +5,6 @@ android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android"> diff --git a/app/src/main/res/values/themes.xml b/app/src/main/res/values/themes.xml index 4f04c69..e7de5c2 100644 --- a/app/src/main/res/values/themes.xml +++ b/app/src/main/res/values/themes.xml @@ -6,9 +6,27 @@ @color/lightgray ?attr/colorPrimary - @style/Widget.App.CheckBox + @style/Theme.Beans.CheckBox + @style/Theme.Beans.ActionBar + @style/Theme.Beans.ActionBar.ButtonOverflow - + + + + + + \ No newline at end of file