home: move shuffle control to fab
Instead of having a play/pause header at the top of the song list, use a FAB instead. This allows people to shuffle all of their songs even if the songs tab isn't enabled, and it can be tranformed into a create FAB when playlists are added.
This commit is contained in:
@@ -48,5 +48,16 @@
|
||||
app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior"
|
||||
tools:layout="@layout/fragment_home_list" />
|
||||
|
||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||
android:id="@+id/home_fab"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/ic_shuffle"
|
||||
android:layout_margin="@dimen/spacing_medium"
|
||||
android:contentDescription="@string/desc_shuffle_all"
|
||||
app:layout_anchor="@id/home_pager"
|
||||
app:layout_behavior="com.google.android.material.behavior.HideBottomViewOnScrollBehavior"
|
||||
app:layout_anchorGravity="bottom|end" />
|
||||
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
</layout>
|
||||
@@ -1,30 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:background="@drawable/ui_header_dividers"
|
||||
android:padding="@dimen/spacing_medium"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/play_button"
|
||||
style="@style/Widget.Auxio.Button.Secondary"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginEnd="@dimen/spacing_small"
|
||||
android:text="@string/lbl_play" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/shuffle_button"
|
||||
style="@style/Widget.Auxio.Button.Primary"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginStart="@dimen/spacing_small"
|
||||
android:text="@string/lbl_shuffle" />
|
||||
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
@@ -119,6 +119,7 @@
|
||||
<string name="desc_skip_prev">Skip to last song</string>
|
||||
<string name="desc_change_loop">Change repeat mode</string>
|
||||
<string name="desc_shuffle">Turn shuffle on or off</string>
|
||||
<string name="desc_shuffle_all">Shuffle all songs</string>
|
||||
|
||||
<string name="desc_clear_user_queue">Clear queue</string>
|
||||
<string name="desc_clear_queue_item">Remove this queue item</string>
|
||||
|
||||
Reference in New Issue
Block a user