Add play buttons to other Detail Fragments
Add play buttons to the ArtistDetailFragment & GenreDetailFragment.
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>
|
||||
|
||||
<LinearLayout
|
||||
@@ -94,6 +98,23 @@
|
||||
app:layout_constraintTop_toBottomOf="@+id/artist_genre"
|
||||
tools:text="2 Albums, 20 Songs" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/artist_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(artist, false)}"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/artist_counts"
|
||||
app:layout_constraintDimensionRatio="1:1"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/artist_genre" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/artist_album_header"
|
||||
android:layout_width="match_parent"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
tools:context=".MainFragment">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/main_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:animateLayoutChanges="true"
|
||||
@@ -20,6 +21,7 @@
|
||||
android:id="@+id/compact_playback"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone"
|
||||
android:name="org.oxycblt.auxio.playback.CompactPlaybackFragment"
|
||||
android:elevation="@dimen/elevation_normal" />
|
||||
|
||||
|
||||
Reference in New Issue
Block a user