Move play & shuffle to dedicated buttons
Move the play and shuffle actions to dedicated buttons on the DetailFragments. Actually looks r e a l l y nice.
This commit is contained in:
@@ -13,6 +13,10 @@
|
||||
<variable
|
||||
name="detailModel"
|
||||
type="org.oxycblt.auxio.detail.DetailViewModel" />
|
||||
|
||||
<variable
|
||||
name="playbackModel"
|
||||
type="org.oxycblt.auxio.playback.PlaybackViewModel" />
|
||||
</data>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
@@ -42,7 +46,7 @@
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintStart_toEndOf="@+id/artist_image"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/artist_image"
|
||||
app:layout_constraintVertical_chainStyle="packed"
|
||||
tools:text="Artist Name" />
|
||||
|
||||
@@ -67,18 +71,40 @@
|
||||
android:textAppearance="?android:attr/textAppearanceListItem"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
app:artistCounts="@{artist}"
|
||||
app:layout_constraintBottom_toTopOf="@+id/artist_album_header"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/artist_image"
|
||||
app:layout_constraintStart_toEndOf="@+id/artist_image"
|
||||
app:layout_constraintTop_toBottomOf="@+id/artist_genre"
|
||||
tools:text="2 Albums, 20 Songs" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/artist_play_button"
|
||||
style="@style/Widget.MaterialComponents.Button.Unimportant"
|
||||
android:onClick="@{() -> playbackModel.playArtist(artist, false)}"
|
||||
android:text="@string/label_play"
|
||||
app:layout_constraintEnd_toStartOf="@+id/artist_shuffle_button"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/artist_image"
|
||||
tools:textColor="@color/blue" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/artist_shuffle_button"
|
||||
style="@style/Widget.MaterialComponents.Button.Highlighted"
|
||||
android:onClick="@{() -> playbackModel.playArtist(artist, true)}"
|
||||
android:text="@string/label_shuffle"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/artist_play_button"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/artist_play_button"
|
||||
app:layout_constraintTop_toTopOf="@+id/artist_play_button"
|
||||
tools:backgroundTint="@color/blue" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/artist_album_header"
|
||||
style="@style/HeaderText"
|
||||
android:layout_marginTop="@dimen/margin_medium"
|
||||
android:layout_marginTop="@dimen/margin_small"
|
||||
android:text="@string/label_albums"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/artist_image" />
|
||||
app:layout_constraintTop_toBottomOf="@+id/artist_play_button" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/artist_sort_button"
|
||||
|
||||
Reference in New Issue
Block a user