playback: improve queue ui

Make the queue UI follow the liftOnScroll idiom that is already used
in the detail views. This also tweaks the edge-to-edge behavior so
that this view properly works.
This commit is contained in:
OxygenCobalt
2021-08-24 20:04:32 -06:00
parent 9162246b8b
commit 9ce7dc598d
6 changed files with 48 additions and 18 deletions
+19 -7
View File
@@ -4,18 +4,29 @@
xmlns:tools="http://schemas.android.com/tools"
tools:context=".playback.queue.QueueFragment">
<LinearLayout
<androidx.coordinatorlayout.widget.CoordinatorLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:animateLayoutChanges="true"
android:background="?attr/colorSurface"
android:orientation="vertical">
<androidx.appcompat.widget.Toolbar
android:id="@+id/queue_toolbar"
style="@style/Widget.Toolbar.Icon.Down"
app:navigationIcon="@drawable/ic_down"
app:title="@string/lbl_queue" />
<com.google.android.material.appbar.AppBarLayout
android:id="@+id/queue_appbar"
android:layout_width="match_parent"
android:background="?attr/colorSurface"
android:layout_height="wrap_content"
app:liftOnScroll="true">
<androidx.appcompat.widget.Toolbar
android:id="@+id/queue_toolbar"
style="@style/Widget.Toolbar.Icon.Down"
android:elevation="0dp"
app:navigationIcon="@drawable/ic_down"
app:title="@string/lbl_queue" />
</com.google.android.material.appbar.AppBarLayout>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/queue_recycler"
@@ -23,7 +34,8 @@
android:layout_height="match_parent"
android:overScrollMode="ifContentScrolls"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior"
tools:listitem="@layout/item_queue_song" />
</LinearLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
</layout>