mirror of
https://github.com/libre-tube/LibreTube.git
synced 2024-12-13 13:50:30 +05:30
MY Option
This commit is contained in:
parent
3b26ab31ed
commit
5c420b773c
@ -14,7 +14,7 @@
|
||||
android:label="@string/app_name"
|
||||
android:roundIcon="@mipmap/ic_libretube_round"
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/Theme.Red"
|
||||
android:theme="@style/Theme.MY"
|
||||
android:name=".myApp"
|
||||
android:networkSecurityConfig="@xml/network_security_config"
|
||||
android:largeHeap="true"
|
||||
|
@ -29,7 +29,6 @@ import androidx.navigation.ui.setupWithNavController
|
||||
import androidx.preference.PreferenceManager
|
||||
import com.google.android.material.bottomnavigation.BottomNavigationView
|
||||
import com.google.android.material.color.DynamicColors
|
||||
import java.util.*
|
||||
|
||||
class MainActivity : AppCompatActivity() {
|
||||
val TAG = "MainActivity"
|
||||
|
@ -8,7 +8,7 @@ import java.util.*
|
||||
fun updateAccentColor(context: Context) {
|
||||
val colorAccent = PreferenceManager.getDefaultSharedPreferences(context).getString("accent_color", "red")
|
||||
when (colorAccent) {
|
||||
"my" -> {}
|
||||
"my" -> context.setTheme(R.style.Theme_MY)
|
||||
"red" -> context.setTheme(R.style.Theme_Red)
|
||||
"blue" -> context.setTheme(R.style.Theme_Blue)
|
||||
"yellow" -> context.setTheme(R.style.Theme_Yellow)
|
||||
|
@ -1,5 +1,7 @@
|
||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<style name="Theme.MY" parent="Theme.Material3.Dark.NoActionBar"></style>
|
||||
|
||||
<style name="Theme.Red" parent="Theme.Material3.Dark.NoActionBar">
|
||||
|
||||
<item name="colorPrimary">@color/red_dark_accentLight</item> // container
|
||||
|
@ -1,6 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<style name="Theme.MY" parent="Theme.Material3.Light.NoActionBar"></style>
|
||||
|
||||
<style name="Theme.Red" parent="Theme.Material3.Light.NoActionBar">
|
||||
|
||||
<item name="colorPrimary">@color/red_light_accentLight</item> // container
|
||||
|
@ -1,5 +1,7 @@
|
||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<style name="Theme.MY" parent="Theme.Material3.Light.NoActionBar"></style>
|
||||
|
||||
<style name="Theme.Red" parent="Theme.Material3.Light.NoActionBar">
|
||||
|
||||
<item name="colorPrimary">@color/red_light_accentLight</item> // container
|
||||
|
Loading…
Reference in New Issue
Block a user