Add shuffle buttons to Detail Fragments

Add shuffle buttons to AlbumDetailFragment & ArtistDetailFragment.
This commit is contained in:
OxygenCobalt
2020-10-15 15:31:06 -06:00
parent c422071e93
commit 00667151dc
4 changed files with 54 additions and 6 deletions
@@ -104,7 +104,7 @@
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginTop="@dimen/margin_tiny"
android:layout_marginEnd="@dimen/margin_medium"
android:layout_marginEnd="@dimen/margin_tiny"
android:background="@drawable/ui_circular_button"
android:backgroundTint="?android:attr/colorPrimary"
android:contentDescription="@string/description_play"
@@ -112,6 +112,24 @@
android:onClick="@{() -> playbackModel.play(artist, false)}"
app:layout_constraintBottom_toBottomOf="@+id/artist_counts"
app:layout_constraintDimensionRatio="1:1"
app:layout_constraintEnd_toStartOf="@+id/album_shuffle"
app:layout_constraintTop_toTopOf="@+id/artist_genre" />
<ImageButton
android:id="@+id/album_shuffle"
style="@style/Widget.AppCompat.Button.Borderless"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginEnd="@dimen/margin_medium"
android:layout_marginTop="@dimen/margin_tiny"
android:background="@drawable/ui_circular_button"
android:backgroundTint="?android:attr/colorPrimary"
android:contentDescription="@string/description_play"
android:onClick="@{() -> playbackModel.play(artist, true)}"
android:src="@drawable/ic_shuffle_small"
android:tint="@color/background"
app:layout_constraintBottom_toBottomOf="@+id/artist_counts"
app:layout_constraintDimensionRatio="1:1"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@+id/artist_genre" />
@@ -166,5 +184,4 @@
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.core.widget.NestedScrollView>
</LinearLayout>
</layout>