style: remove elevation from toolbars

Remove the elevation component from all toolbars and the bottom bar.

Material3 states that top and bottom app bars should not cast a drop
shadow. Auxio ignored this and used one anyway. This largely stemmed
from incorrect use of the AppBarLayout styles, which were mostly just
incorrect M2 styles with a new background plastered over. Fix this
by creating a new style that inherits the proper M3 styles and then
using that on all AppBarLayout instances in the app.
This commit is contained in:
OxygenCobalt
2022-02-10 17:34:03 -07:00
parent 04bec3161f
commit f377e144dd
8 changed files with 13 additions and 23 deletions
+1 -3
View File
@@ -12,9 +12,7 @@
<org.oxycblt.auxio.ui.EdgeAppBarLayout
android:id="@+id/about_appbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/colorSurface"
style="@style/Widget.Auxio.AppBarLayout"
app:liftOnScroll="true">
<com.google.android.material.appbar.MaterialToolbar
+1 -3
View File
@@ -15,9 +15,7 @@
<org.oxycblt.auxio.detail.DetailAppBarLayout
android:id="@+id/detail_appbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/colorSurface"
style="@style/Widget.Auxio.AppBarLayout"
app:liftOnScroll="true"
app:liftOnScrollTargetViewId="@id/detail_recycler">
+1 -3
View File
@@ -11,9 +11,7 @@
<org.oxycblt.auxio.ui.EdgeAppBarLayout
android:id="@+id/home_appbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/colorSurface"
style="@style/Widget.Auxio.AppBarLayout"
app:liftOnScroll="true">
<com.google.android.material.appbar.MaterialToolbar
+1 -3
View File
@@ -13,9 +13,7 @@
<org.oxycblt.auxio.ui.EdgeAppBarLayout
android:id="@+id/queue_appbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/colorSurface"
style="@style/Widget.Auxio.AppBarLayout"
app:liftOnScroll="true"
app:liftOnScrollTargetViewId="@id/queue_recycler">
+1 -3
View File
@@ -9,9 +9,7 @@
<org.oxycblt.auxio.ui.EdgeAppBarLayout
android:id="@+id/search_appbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/colorSurface"
style="@style/Widget.Auxio.AppBarLayout"
app:liftOnScroll="true"
app:liftOnScrollTargetViewId="@id/search_recycler">
@@ -13,9 +13,7 @@
<org.oxycblt.auxio.ui.EdgeAppBarLayout
android:id="@+id/settings_appbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/colorSurface"
style="@style/Widget.Auxio.AppBarLayout"
android:clickable="true"
android:focusable="true"
app:liftOnScroll="true">
+5
View File
@@ -2,6 +2,11 @@
<resources>
<!-- SHARED RE-USABLE UI STYLES -->
<style name="Widget.Auxio.AppBarLayout" parent="Widget.Material3.AppBarLayout">
<item name="android:layout_width">match_parent</item>
<item name="android:layout_height">wrap_content</item>
</style>
<!-- Base toolbar style -->
<style name="Widget.Auxio.Toolbar" parent="">
<item name="android:layout_width">match_parent</item>