Add user queue
Add a user-generated queue, currently it isnt played from.
This commit is contained in:
@@ -11,10 +11,16 @@
|
||||
<aapt:attr name="android:fillColor">
|
||||
<gradient
|
||||
android:type="linear"
|
||||
android:startX="60" android:startY="61.5"
|
||||
android:endX="64.75" android:endY="28.5">
|
||||
<item android:color="#2196f3" android:offset="0.0"/>
|
||||
<item android:color="#90caf9" android:offset="1.0"/>
|
||||
android:startX="60"
|
||||
android:startY="61.5"
|
||||
android:endX="64.75"
|
||||
android:endY="28.5">
|
||||
<item
|
||||
android:color="#2196f3"
|
||||
android:offset="0.0" />
|
||||
<item
|
||||
android:color="#90caf9"
|
||||
android:offset="1.0" />
|
||||
</gradient>
|
||||
</aapt:attr>
|
||||
</path>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M19,6.41L17.59,5 12,10.59 6.41,5 5,6.41 10.59,12 5,17.59 6.41,19 12,13.41 17.59,19 19,17.59 13.41,12z"/>
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M19,6.41L17.59,5 12,10.59 6.41,5 5,6.41 10.59,12 5,17.59 6.41,19 12,13.41 17.59,19 19,17.59 13.41,12z" />
|
||||
</vector>
|
||||
@@ -11,10 +11,16 @@
|
||||
<aapt:attr name="android:fillColor">
|
||||
<gradient
|
||||
android:type="linear"
|
||||
android:startX="60" android:startY="61.5"
|
||||
android:endX="64.75" android:endY="28.5">
|
||||
<item android:color="#2196f3" android:offset="0.0"/>
|
||||
<item android:color="#90caf9" android:offset="1.0"/>
|
||||
android:startX="60"
|
||||
android:startY="61.5"
|
||||
android:endX="64.75"
|
||||
android:endY="28.5">
|
||||
<item
|
||||
android:color="#2196f3"
|
||||
android:offset="0.0" />
|
||||
<item
|
||||
android:color="#90caf9"
|
||||
android:offset="1.0" />
|
||||
</gradient>
|
||||
</aapt:attr>
|
||||
</path>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M7,7h10v3l4,-4 -4,-4v3L5,5v6h2L7,7zM17,17L7,17v-3l-4,4 4,4v-3h12v-6h-2v4z"/>
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M7,7h10v3l4,-4 -4,-4v3L5,5v6h2L7,7zM17,17L7,17v-3l-4,4 4,4v-3h12v-6h-2v4z" />
|
||||
</vector>
|
||||
@@ -4,7 +4,7 @@
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="#80ffffff"
|
||||
android:pathData="M7,7h10v3l4,-4 -4,-4v3L5,5v6h2L7,7zM17,17L7,17v-3l-4,4 4,4v-3h12v-6h-2v4z"/>
|
||||
<path
|
||||
android:fillColor="#80ffffff"
|
||||
android:pathData="M7,7h10v3l4,-4 -4,-4v3L5,5v6h2L7,7zM17,17L7,17v-3l-4,4 4,4v-3h12v-6h-2v4z" />
|
||||
</vector>
|
||||
@@ -5,7 +5,7 @@
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M7,7h10v3l4,-4 -4,-4v3L5,5v6h2L7,7zM17,17L7,17v-3l-4,4 4,4v-3h12v-6h-2v4z"/>
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M7,7h10v3l4,-4 -4,-4v3L5,5v6h2L7,7zM17,17L7,17v-3l-4,4 4,4v-3h12v-6h-2v4z" />
|
||||
</vector>
|
||||
@@ -5,7 +5,7 @@
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M7,7h10v3l4,-4 -4,-4v3L5,5v6h2L7,7zM17,17L7,17v-3l-4,4 4,4v-3h12v-6h-2v4zM13,15L13,9h-1l-2,1v1h1.5v4L13,15z"/>
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M7,7h10v3l4,-4 -4,-4v3L5,5v6h2L7,7zM17,17L7,17v-3l-4,4 4,4v-3h12v-6h-2v4zM13,15L13,9h-1l-2,1v1h1.5v4L13,15z" />
|
||||
</vector>
|
||||
@@ -5,7 +5,7 @@
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M7,7h10v3l4,-4 -4,-4v3L5,5v6h2L7,7zM17,17L7,17v-3l-4,4 4,4v-3h12v-6h-2v4zM13,15L13,9h-1l-2,1v1h1.5v4L13,15z"/>
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M7,7h10v3l4,-4 -4,-4v3L5,5v6h2L7,7zM17,17L7,17v-3l-4,4 4,4v-3h12v-6h-2v4zM13,15L13,9h-1l-2,1v1h1.5v4L13,15z" />
|
||||
</vector>
|
||||
@@ -5,6 +5,7 @@
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="?android:attr/colorControlNormal">
|
||||
<path android:fillColor="@android:color/white"
|
||||
android:pathData="M5.571 19.5h4.286v-15H5.571zm8.572-15v15h4.286v-15z"/>
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M5.571 19.5h4.286v-15H5.571zm8.572-15v15h4.286v-15z" />
|
||||
</vector>
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
<path android:fillColor="@android:color/white"
|
||||
android:pathData="M5.078 4.089V12h13.844zm0 15.822V12h13.844z"/>
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M5.078 4.089V12h13.844zm0 15.822V12h13.844z" />
|
||||
</vector>
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M4,6L2,6v14c0,1.1 0.9,2 2,2h14v-2L4,20L4,6zM20,2L8,2c-1.1,0 -2,0.9 -2,2v12c0,1.1 0.9,2 2,2h12c1.1,0 2,-0.9 2,-2L22,4c0,-1.1 -0.9,-2 -2,-2zM19,11h-4v4h-2v-4L9,11L9,9h4L13,5h2v4h4v2z" />
|
||||
</vector>
|
||||
@@ -15,6 +15,7 @@
|
||||
type="org.oxycblt.auxio.playback.PlaybackViewModel" />
|
||||
</data>
|
||||
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/playback_layout"
|
||||
android:layout_width="match_parent"
|
||||
@@ -213,7 +214,7 @@
|
||||
app:layout_constraintBottom_toBottomOf="@+id/playback_play_pause"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/playback_play_pause"
|
||||
android:contentDescription="@string/description_loop"/>
|
||||
android:contentDescription="@string/description_loop" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</layout>
|
||||
@@ -2,28 +2,15 @@
|
||||
<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
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:theme="@style/Theme.Base"
|
||||
android:background="@color/background">
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/queue_header"
|
||||
<androidx.viewpager2.widget.ViewPager2
|
||||
android:id="@+id/queue_viewpager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="@dimen/padding_medium"
|
||||
android:text="@string/label_queue"
|
||||
android:fontFamily="@font/inter_black"
|
||||
android:textAppearance="@style/TextAppearance.Toolbar.Header" />
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/queue_recycler"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:listitem="@layout/item_song"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />
|
||||
|
||||
</LinearLayout>
|
||||
</FrameLayout>
|
||||
</layout>
|
||||
@@ -0,0 +1,49 @@
|
||||
<?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">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/queue_header"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="marquee"
|
||||
android:fontFamily="@font/inter_black"
|
||||
android:marqueeRepeatLimit="marquee_forever"
|
||||
android:padding="@dimen/padding_medium"
|
||||
android:singleLine="true"
|
||||
android:text="@string/label_queue"
|
||||
android:textColor="?android:attr/colorPrimary"
|
||||
android:textAppearance="@style/TextAppearance.Toolbar.Header"
|
||||
app:layout_constraintEnd_toStartOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<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>
|
||||
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item
|
||||
android:id="@+id/action_queue_add"
|
||||
android:title="@string/label_queue_add"
|
||||
android:icon="@drawable/ic_user_queue" />
|
||||
</menu>
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@drawable/ic_launcher_background"/>
|
||||
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
|
||||
<background android:drawable="@drawable/ic_launcher_background" />
|
||||
<foreground android:drawable="@drawable/ic_launcher_foreground" />
|
||||
</adaptive-icon>
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@drawable/ic_launcher_background"/>
|
||||
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
|
||||
<background android:drawable="@drawable/ic_launcher_background" />
|
||||
<foreground android:drawable="@drawable/ic_launcher_foreground" />
|
||||
</adaptive-icon>
|
||||
@@ -115,14 +115,18 @@
|
||||
android:id="@+id/playback_fragment"
|
||||
android:name="org.oxycblt.auxio.playback.PlaybackFragment"
|
||||
android:label="PlaybackFragment"
|
||||
tools:layout="@layout/fragment_playback" >
|
||||
tools:layout="@layout/fragment_playback">
|
||||
<action
|
||||
android:id="@+id/action_show_queue"
|
||||
app:destination="@id/queue_fragment" />
|
||||
app:destination="@id/queue_fragment"
|
||||
app:enterAnim="@anim/anim_nav_slide_up"
|
||||
app:exitAnim="@anim/anim_stationary"
|
||||
app:popEnterAnim="@anim/anim_stationary"
|
||||
app:popExitAnim="@anim/anim_nav_slide_down" />
|
||||
</fragment>
|
||||
<dialog
|
||||
android:id="@+id/queue_fragment"
|
||||
android:name="org.oxycblt.auxio.playback.queue.QueueFragment"
|
||||
android:label="QueueFragment"
|
||||
tools:layout="@layout/fragment_queue"/>
|
||||
tools:layout="@layout/fragment_queue" />
|
||||
</navigation>
|
||||
@@ -27,7 +27,9 @@
|
||||
<string name="label_play">Play</string>
|
||||
<string name="label_queue">Queue</string>
|
||||
<string name="label_queue_add">Add to queue</string>
|
||||
<string name="label_next_user_queue">Next in Queue</string>
|
||||
<string name="label_next_songs">Next from: All Songs</string>
|
||||
<string name="label_empty_queue">Nothing here.</string>
|
||||
<string name="label_notification_playback">Music Playback</string>
|
||||
<string name="label_service_playback">The music playback service for Auxio.</string>
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
<item name="android:textCursorDrawable">@drawable/ui_cursor</item>
|
||||
<item name="android:fitsSystemWindows">true</item>
|
||||
|
||||
<item name="android:popupMenuStyle">@style/Widget.CustomPopup</item>
|
||||
<item name="colorControlNormal">@color/control_color</item>
|
||||
</style>
|
||||
|
||||
@@ -41,6 +42,11 @@
|
||||
<item name="colorControlHighlight">@color/selection_color</item>
|
||||
</style>
|
||||
|
||||
<style name="Widget.CustomPopup" parent="Widget.AppCompat.PopupMenu">
|
||||
<item name="android:colorBackground">@color/background</item>
|
||||
<item name="android:popupBackground">@color/background</item>
|
||||
</style>
|
||||
|
||||
<!--
|
||||
Fix to get QueueFragment to not overlap the Status Bar or Navigation Bar
|
||||
https://stackoverflow.com/a/57790787/14143986
|
||||
|
||||
Reference in New Issue
Block a user