Add play buttons to other Detail Fragments

Add play buttons to the ArtistDetailFragment & GenreDetailFragment.
This commit is contained in:
OxygenCobalt
2020-10-14 15:49:49 -06:00
parent a64627c7cf
commit c17666752b
11 changed files with 157 additions and 36 deletions
@@ -13,6 +13,10 @@
<variable
name="detailModel"
type="org.oxycblt.auxio.detail.DetailViewModel" />
<variable
name="playbackModel"
type="org.oxycblt.auxio.playback.PlaybackViewModel" />
</data>
<LinearLayout
@@ -95,6 +99,23 @@
app:layout_constraintTop_toBottomOf="@+id/genre_counts"
tools:text="80 Songs" />
<ImageButton
android:id="@+id/genre_play"
style="@style/Widget.AppCompat.Button.Borderless"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginTop="@dimen/margin_tiny"
android:layout_marginEnd="@dimen/margin_medium"
android:background="@drawable/ui_circular_button"
android:backgroundTint="?android:attr/colorPrimary"
android:contentDescription="@string/description_play"
android:src="@drawable/ic_play"
android:onClick="@{() -> playbackModel.play(genre, false)}"
app:layout_constraintBottom_toBottomOf="@+id/genre_song_count"
app:layout_constraintDimensionRatio="1:1"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@+id/genre_counts" />
<TextView
android:id="@+id/genre_artist_header"
android:layout_width="match_parent"