ui: improve playback/about UIs

Make playback/about UIs follow the new liftOnScroll and edge-to-edge
idioms. This finally allows me to collapse a lot of duplicate code
into MainActivity and in general reduce code mess.
This commit is contained in:
OxygenCobalt
2021-08-30 19:53:19 -06:00
parent 1251af660a
commit 765f92ca98
17 changed files with 56 additions and 39 deletions
+19 -8
View File
@@ -4,21 +4,32 @@
xmlns:tools="http://schemas.android.com/tools"
tools:context=".settings.AboutFragment">
<LinearLayout
<androidx.coordinatorlayout.widget.CoordinatorLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/colorSurface"
android:fitsSystemWindows="true"
android:orientation="vertical">
<androidx.appcompat.widget.Toolbar
android:id="@+id/about_toolbar"
style="@style/Widget.Toolbar.Icon.Down"
app:title="@string/lbl_about" />
<com.google.android.material.appbar.AppBarLayout
android:id="@+id/about_appbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/colorSurface"
app:liftOnScroll="true">
<androidx.appcompat.widget.Toolbar
android:id="@+id/about_toolbar"
style="@style/Widget.Toolbar.Icon.Down"
app:title="@string/lbl_about" />
</com.google.android.material.appbar.AppBarLayout>
<androidx.core.widget.NestedScrollView
android:id="@+id/about_contents"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="match_parent"
android:clipToPadding="false"
app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior">
<com.google.android.material.card.MaterialCardView
android:layout_width="match_parent"
@@ -166,5 +177,5 @@
</androidx.constraintlayout.widget.ConstraintLayout>
</com.google.android.material.card.MaterialCardView>
</androidx.core.widget.NestedScrollView>
</LinearLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
</layout>
@@ -24,7 +24,6 @@
<androidx.appcompat.widget.Toolbar
android:id="@+id/home_toolbar"
style="@style/Widget.Toolbar"
android:elevation="0dp"
app:layout_scrollFlags="scroll|enterAlways"
app:menu="@menu/menu_home"
app:title="@string/info_app_name" />
@@ -23,13 +23,11 @@
android:id="@+id/playback_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?attr/colorSurface"
android:fitsSystemWindows="true">
android:background="?attr/colorSurface">
<androidx.appcompat.widget.Toolbar
android:id="@+id/playback_toolbar"
style="@style/Widget.Toolbar.Icon.Down"
android:elevation="0dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:menu="@menu/menu_playback"
@@ -17,7 +17,6 @@
<androidx.appcompat.widget.Toolbar
android:id="@+id/search_toolbar"
style="@style/Widget.Toolbar.Icon"
android:elevation="0dp"
app:layout_scrollFlags="scroll|enterAlways"
app:menu="@menu/menu_search"
app:title="@string/lbl_search" />