Fix themes

This commit is contained in:
MrLetsplay 2023-06-24 23:41:45 +02:00
parent 130e2cf1ac
commit 0e0aedcd34
Signed by: mr
SSH Key Fingerprint: SHA256:92jBH80vpXyaZHjaIl47pjRq+Yt7XGTArqQg1V7hSqg
5 changed files with 16 additions and 20 deletions

View File

@ -52,7 +52,6 @@ public class SettingsFragment extends Fragment {
Integer themeID = SettingsUtil.THEMES.get(theme);
if(themeID == null) return;
Log.e("AMOGUS", "REstarting activity");
requireActivity().setTheme(themeID);
requireActivity().recreate();
}

View File

@ -1,5 +1,6 @@
package com.cringe_studios.cringe_authenticator.util;
import android.content.Context;
import android.os.Bundle;
import androidx.appcompat.app.AppCompatActivity;

View File

@ -1,9 +1,6 @@
<resources xmlns:tools="http://schemas.android.com/tools">
<style name="Base.Theme.CringeAuthenticator" parent="Base.Theme.CringeAuthenticator_Base">
<!-- Customize your dark theme here. -->
<!-- <item name="colorPrimary">@color/my_dark_primary</item> -->
<style name="Theme.CringeAuthenticator" parent="Base.Theme.CringeAuthenticator">
<item name="android:textColor">@color/white</item>
<item name="colorOnBackground">@color/background_grey</item>
</style>
</resources>

View File

@ -1,5 +1,4 @@
<resources xmlns:tools="http://schemas.android.com/tools">
<style name="Theme.CringeAuthenticator" parent="Base.Theme.CringeAuthenticator">
<!-- Transparent system bars for edge-to-edge. -->
<item name="android:navigationBarColor">@android:color/transparent</item>

View File

@ -1,42 +1,42 @@
<resources xmlns:tools="http://schemas.android.com/tools">
<!-- Base application theme. -->
<style name="Base.Theme.CringeAuthenticator_Base" parent="Theme.Material3.DayNight.NoActionBar">
<style name="Base.Theme.CringeAuthenticator" parent="Theme.Material3.DayNight.NoActionBar">
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@android:color/transparent</item>
<item name="colorSecondary">@color/colorSecondary</item>
<item name="android:statusBarColor">@android:color/transparent</item>
<item name="colorTheme1">#FF00FF</item>
<item name="colorTheme2">#000000</item>
<item name="android:textColor">@color/black</item>
<item name="colorOnBackground">@color/background_light_grey</item>
</style>
<style name="Base.Theme.CringeAuthenticator" parent="Base.Theme.CringeAuthenticator_Base">
<!--<item name="android:textColor">@color/black</item>
<item name="colorOnBackground">@color/white</item>-->
<!--<item name="colorTheme1">@color/color_blue_green_1</item>
<item name="colorTheme2">@color/color_blue_green_2</item>-->
</style>
<style name="Theme.CringeAuthenticator" parent="Base.Theme.CringeAuthenticator" />
<style name="Theme.CringeAuthenticator.None" parent="Base.Theme.CringeAuthenticator" />
<style name="Theme.CringeAuthenticator.None" />
<style name="Theme.CringeAuthenticator.Blue_Green" parent="Base.Theme.CringeAuthenticator">
<style name="Theme.CringeAuthenticator.Blue_Green">
<item name="colorTheme1">@color/color_blue</item>
<item name="colorTheme2">@color/color_light_green</item>
</style>
<style name="Theme.CringeAuthenticator.Red_Blue" parent="Base.Theme.CringeAuthenticator">
<style name="Theme.CringeAuthenticator.Red_Blue">
<item name="colorTheme1">@color/color_red</item>
<item name="colorTheme2">@color/color_blue</item>
</style>
<style name="Theme.CringeAuthenticator.Pink_Green" parent="Base.Theme.CringeAuthenticator">
<style name="Theme.CringeAuthenticator.Pink_Green">
<item name="colorTheme1">@color/color_pink</item>
<item name="colorTheme2">@color/color_green</item>
</style>
<style name="Theme.CringeAuthenticator.Blue_Yellow" parent="Base.Theme.CringeAuthenticator">
<style name="Theme.CringeAuthenticator.Blue_Yellow">
<item name="colorTheme1">@color/color_blue</item>
<item name="colorTheme2">@color/color_yellow</item>
</style>
<style name="Theme.CringeAuthenticator.Green_Yellow" parent="Base.Theme.CringeAuthenticator">
<style name="Theme.CringeAuthenticator.Green_Yellow">
<item name="colorTheme1">@color/color_green</item>
<item name="colorTheme2">@color/color_yellow</item>
</style>
<style name="Theme.CringeAuthenticator.Orange_Turquoise" parent="Base.Theme.CringeAuthenticator">
<style name="Theme.CringeAuthenticator.Orange_Turquoise">
<item name="colorTheme1">@color/color_orange</item>
<item name="colorTheme2">@color/color_turquoise</item>
</style>