Unify Queue

Make QueueFragment contain both the user queue and the next queue, instead of having viewpager between the two.
This commit is contained in:
OxygenCobalt
2020-11-09 15:39:13 -07:00
parent b5552411b6
commit 67d10009d4
17 changed files with 189 additions and 302 deletions
@@ -37,6 +37,7 @@
app:title="@string/title_library_fragment" />
<androidx.core.widget.NestedScrollView
android:id="@+id/nested_scroll"
android:layout_width="match_parent"
android:layout_height="match_parent">
+20 -4
View File
@@ -6,7 +6,9 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
android:orientation="vertical"
android:background="@color/background"
android:animateLayoutChanges="true">
<androidx.appcompat.widget.Toolbar
android:id="@+id/queue_toolbar"
@@ -22,10 +24,24 @@
app:title="@string/label_queue"
app:titleTextAppearance="@style/TextAppearance.Toolbar.Header" />
<androidx.viewpager2.widget.ViewPager2
android:id="@+id/queue_viewpager"
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/queue_recycler"
android:layout_width="match_parent"
android:layout_height="match_parent" />
android:layout_height="match_parent"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
app:layout_constraintTop_toBottomOf="@+id/queue_header"
tools:layout_editor_absoluteX="0dp"
tools:listitem="@layout/item_song" />
<TextView
android:id="@+id/queue_nothing_indicator"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="@dimen/margin_medium"
android:textSize="15sp"
android:text="@string/label_empty_queue"
android:textAlignment="center"
android:visibility="gone" />
</LinearLayout>
</layout>
@@ -1,48 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="@color/background"
android:animateLayoutChanges="true">
<TextView
android:id="@+id/queue_header"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/ui_header_dividers"
android:fontFamily="@font/inter_bold"
android:paddingStart="@dimen/padding_medium"
android:paddingTop="@dimen/padding_small"
android:paddingEnd="@dimen/padding_small"
android:paddingBottom="@dimen/padding_small"
android:textAppearance="@style/TextAppearance.MaterialComponents.Overline"
android:textSize="16sp"
tools:text="Next in Queue"
app:layout_constraintTop_toBottomOf="@+id/album_details" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/queue_recycler"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
app:layout_constraintTop_toBottomOf="@+id/queue_header"
tools:layout_editor_absoluteX="0dp"
tools:listitem="@layout/item_song" />
<TextView
android:id="@+id/queue_nothing_indicator"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="@dimen/margin_medium"
android:textSize="15sp"
android:text="@string/label_empty_queue"
android:textAlignment="center"
android:visibility="gone" />
</LinearLayout>
</layout>
+1 -1
View File
@@ -27,7 +27,7 @@
android:paddingBottom="@dimen/padding_small"
android:textAppearance="@style/TextAppearance.MaterialComponents.Overline"
android:textSize="16sp"
app:headerText="@{header}"
android:text="@{header.name}"
tools:text="Songs" />
</FrameLayout>