ui: refactor shadow management
Make the shadow disabling workaround an XML style. Doing it this way is more elegant than disabling it in-code.
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
android:id="@+id/playback_sheet"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
style="@style/Widget.Auxio.DisableDropShadows"
|
||||
app:layout_behavior="org.oxycblt.auxio.playback.PlaybackSheetBehavior">
|
||||
|
||||
<androidx.fragment.app.FragmentContainerView
|
||||
@@ -41,6 +42,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
style="@style/Widget.Auxio.DisableDropShadows"
|
||||
app:layout_behavior="org.oxycblt.auxio.playback.queue.QueueSheetBehavior">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
style="@style/Widget.Auxio.DisableDropShadows"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
|
||||
@@ -93,6 +93,12 @@
|
||||
<item name="android:paddingBottom">@dimen/recycler_fab_space_normal</item>
|
||||
</style>
|
||||
|
||||
<style name="Widget.Auxio.DisableDropShadows" parent="">
|
||||
<!-- API 28+ Only -->
|
||||
<item name="android:outlineAmbientShadowColor" tools:ignore="NewApi">@android:color/transparent</item>
|
||||
<item name="android:outlineSpotShadowColor" tools:ignore="NewApi">@android:color/transparent</item>
|
||||
</style>
|
||||
|
||||
<style name="ThemeOverlay.Accent" parent="">
|
||||
<item name="colorOnPrimary">?attr/colorSurface</item>
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user