Made fab circle for Player themes

This commit is contained in:
Prathamesh More 2021-10-21 20:14:02 +05:30
parent e35311ff85
commit 9628255b8f
5 changed files with 29 additions and 1 deletions

View file

@ -31,5 +31,8 @@
<item name="materialCardViewStyle">@style/Widget.MaterialComponents.CardView</item>
<item name="bottomSheetTint">@color/bottomSheetColor</item>
<item name="elevationOverlayColor">@color/elevationOverlayDark</item>
<item name="floatingActionButtonStyle">
@style/Widget.MaterialComponents.FloatingActionButton
</item>
</style>
</resources>

View file

@ -30,5 +30,8 @@
<item name="colorSurface">@color/darkColorSurface</item>
<item name="android:navigationBarColor">@android:color/transparent</item>
<item name="materialCardViewStyle">@style/Widget.Material3.CardView.Elevated</item>
<item name="floatingActionButtonStyle">
@style/Widget.MaterialComponents.FloatingActionButton
</item>
</style>
</resources>

View file

@ -29,6 +29,9 @@
<item name="materialCardViewStyle">@style/Widget.Material3.CardView.Elevated</item>
<item name="bottomSheetTint">@color/bottomSheetColor</item>
<item name="elevationOverlayColor">@color/elevationOverlay</item>
<item name="floatingActionButtonStyle">
@style/Widget.MaterialComponents.FloatingActionButton
</item>
</style>
<style name="Theme.RetroMusic.Base" parent="Theme.Material3.DayNight.NoActionBar">
@ -51,6 +54,9 @@
<item name="materialCardViewStyle">@style/Widget.Material3.CardView.Elevated</item>
<item name="bottomSheetTint">@color/bottomSheetColor</item>
<item name="elevationOverlayColor">@color/elevationOverlay</item>
<item name="floatingActionButtonStyle">
@style/Widget.MaterialComponents.FloatingActionButton
</item>
</style>
<style name="Theme.RetroMusic.Base.Light" parent="Theme.Material3.Light.NoActionBar">
@ -70,5 +76,8 @@
<item name="materialCardViewStyle">@style/Widget.Material3.CardView.Elevated</item>
<item name="bottomSheetTint">@color/bottomSheetColorLight</item>
<item name="elevationOverlayColor">@color/elevationOverlayLight</item>
<item name="floatingActionButtonStyle">
@style/Widget.MaterialComponents.FloatingActionButton
</item>
</style>
</resources>

View file

@ -17,6 +17,9 @@
<item name="materialCardViewStyle">@style/Widget.Material3.CardView.Elevated</item>
<item name="bottomSheetTint">@color/bottomSheetColor</item>
<item name="elevationOverlayColor">@color/elevationOverlay</item>
<item name="floatingActionButtonStyle">
@style/Widget.MaterialComponents.FloatingActionButton
</item>
</style>
<style name="Theme.RetroMusic.Base" parent="Theme.Material3.DayNight.NoActionBar">
@ -38,6 +41,9 @@
<item name="materialCardViewStyle">@style/Widget.Material3.CardView.Elevated</item>
<item name="bottomSheetTint">@color/bottomSheetColor</item>
<item name="elevationOverlayColor">@color/elevationOverlay</item>
<item name="floatingActionButtonStyle">
@style/Widget.MaterialComponents.FloatingActionButton
</item>
</style>
<style name="Theme.RetroMusic.Base.Black" parent="Theme.Material3.DayNight.NoActionBar">
@ -57,6 +63,9 @@
<item name="materialCardViewStyle">@style/Widget.Material3.CardView.Elevated</item>
<item name="bottomSheetTint">@color/bottomSheetColorBlack</item>
<item name="elevationOverlayColor">@color/elevationOverlayBlack</item>
<item name="floatingActionButtonStyle">
@style/Widget.MaterialComponents.FloatingActionButton
</item>
</style>
<style name="Theme.RetroMusic.Base.Light" parent="Theme.Material3.Light.NoActionBar">
@ -76,6 +85,9 @@
<item name="materialCardViewStyle">@style/Widget.Material3.CardView.Elevated</item>
<item name="bottomSheetTint">@color/bottomSheetColorLight</item>
<item name="elevationOverlayColor">@color/elevationOverlayLight</item>
<item name="floatingActionButtonStyle">
@style/Widget.MaterialComponents.FloatingActionButton
</item>
</style>
<style name="MusicProgressSliderParent">

View file

@ -6,6 +6,7 @@ import android.graphics.Color
import androidx.annotation.*
import androidx.annotation.IntRange
import androidx.core.content.ContextCompat
import androidx.preference.PreferenceManager
import code.name.monkey.appthemehelper.util.ATHUtil.isWindowBackgroundDark
import code.name.monkey.appthemehelper.util.ATHUtil.resolveColor
import code.name.monkey.appthemehelper.util.ColorUtil
@ -301,7 +302,7 @@ private constructor(private val mContext: Context) : ThemeStorePrefKeys, ThemeSt
}
fun isMD3Enabled(context: Context): Boolean {
return prefs(context).getBoolean(ThemeStorePrefKeys.KEY_MATERIAL_YOU, false)
return PreferenceManager.getDefaultSharedPreferences(context).getBoolean(ThemeStorePrefKeys.KEY_MATERIAL_YOU, false)
}
}
}