Make light mode look nicer

This commit is contained in:
fgerber 2024-04-11 14:56:22 +02:00
parent 679d4b4aa2
commit eda8c89b56
6 changed files with 27 additions and 6 deletions

View File

@ -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)

View File

@ -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)
}

View File

@ -0,0 +1,5 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:autoMirrored="true" android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp">
<path android:fillColor="@android:color/white" android:pathData="M20,11H7.83l5.59,-5.59L12,4l-8,8 8,8 1.41,-1.41L7.83,13H20v-2z"/>
</vector>

View File

@ -5,6 +5,6 @@
android:width="24dp"
xmlns:android="http://schemas.android.com/apk/res/android">
<path
android:fillColor="?attr/colorOnBackground"
android:fillColor="@color/white"
android:pathData="M346,820L100,574Q90,564 85,552Q80,540 80,527Q80,514 85,502Q90,490 100,480L330,251L224,145L286,80L686,480Q696,490 700.5,502Q705,514 705,527Q705,540 700.5,552Q696,564 686,574L440,820Q430,830 418,835Q406,840 393,840Q380,840 368,835Q356,830 346,820ZM393,314L179,528Q179,528 179,528Q179,528 179,528L607,528Q607,528 607,528Q607,528 607,528L393,314ZM792,840Q756,840 731,814.5Q706,789 706,752Q706,725 719.5,701Q733,677 750,654L792,600L836,654Q852,677 866,701Q880,725 880,752Q880,789 854,814.5Q828,840 792,840Z"/>
</vector>

View File

@ -5,6 +5,6 @@
android:width="24dp"
xmlns:android="http://schemas.android.com/apk/res/android">
<path
android:fillColor="?attr/colorOnBackground"
android:fillColor="@color/white"
android:pathData="M3,17.25V21h3.75L17.81,9.94l-3.75,-3.75L3,17.25zM20.71,7.04c0.39,-0.39 0.39,-1.02 0,-1.41l-2.34,-2.34c-0.39,-0.39 -1.02,-0.39 -1.41,0l-1.83,1.83 3.75,3.75 1.83,-1.83z"/>
</vector>

View File

@ -6,9 +6,27 @@
<item name="android:panelColorBackground">@color/lightgray</item>
<item name="android:statusBarColor">?attr/colorPrimary</item>
<item name="checkboxStyle">@style/Widget.App.CheckBox</item>
<item name="checkboxStyle">@style/Theme.Beans.CheckBox</item>
<item name="actionBarStyle">@style/Theme.Beans.ActionBar</item>
<item name="android:actionOverflowButtonStyle">@style/Theme.Beans.ActionBar.ButtonOverflow</item>
</style>
<style name="Widget.App.CheckBox" parent="Widget.Material3.CompoundButton.CheckBox">
<style name="Theme.Beans.CheckBox" parent="Widget.Material3.CompoundButton.CheckBox">
</style>
<style name="Theme.Beans.ActionBar" parent="Widget.Material3.ActionBar.Solid">
<item name="background">?attr/colorPrimary</item>
<item name="titleTextStyle">@style/Theme.Beans.ActionBar.Text</item>
<item name="android:tint">@color/white</item>
<item name="actionMenuTextColor">@color/white</item>
<item name="homeAsUpIndicator">@drawable/back</item>
</style>
<style name="Theme.Beans.ActionBar.Text" parent="TextAppearance.Material3.ActionBar.Title">
<item name="android:textColor">@color/white</item>
</style>
<style name="Theme.Beans.ActionBar.ButtonOverflow" parent="Widget.Material3.Search.ActionButton.Overflow">
<item name="android:tint">@color/white</item>
</style>
</resources>