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:
@@ -5,13 +5,17 @@
|
||||
|
||||
<data>
|
||||
|
||||
<variable
|
||||
name="album"
|
||||
type="org.oxycblt.auxio.music.Album" />
|
||||
|
||||
<variable
|
||||
name="detailModel"
|
||||
type="org.oxycblt.auxio.detail.DetailViewModel" />
|
||||
|
||||
<variable
|
||||
name="album"
|
||||
type="org.oxycblt.auxio.music.Album" />
|
||||
name="playbackModel"
|
||||
type="org.oxycblt.auxio.playback.PlaybackViewModel" />
|
||||
</data>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
@@ -74,13 +78,35 @@
|
||||
app:layout_constraintTop_toBottomOf="@+id/album_artist"
|
||||
tools:text="2020 / 10 Songs / 16:16" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/album_play_button"
|
||||
style="@style/Widget.MaterialComponents.Button.Unimportant"
|
||||
android:onClick="@{() -> playbackModel.playAlbum(album, false)}"
|
||||
android:text="@string/label_play"
|
||||
app:layout_constraintEnd_toStartOf="@+id/album_shuffle_button"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/album_details"
|
||||
tools:textColor="@color/blue" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/album_shuffle_button"
|
||||
style="@style/Widget.MaterialComponents.Button.Highlighted"
|
||||
android:onClick="@{() -> playbackModel.playAlbum(album, true)}"
|
||||
android:text="@string/label_shuffle"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/album_play_button"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/album_play_button"
|
||||
app:layout_constraintTop_toTopOf="@+id/album_play_button"
|
||||
tools:backgroundTint="@color/blue" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/album_song_header"
|
||||
style="@style/HeaderText"
|
||||
android:layout_marginTop="@dimen/margin_medium"
|
||||
android:layout_marginTop="@dimen/margin_small"
|
||||
android:background="@drawable/ui_header_dividers"
|
||||
android:text="@string/label_songs"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/album_details" />
|
||||
app:layout_constraintTop_toBottomOf="@+id/album_play_button" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/album_sort_button"
|
||||
|
||||
Reference in New Issue
Block a user