Add shuffle buttons to Detail Fragments
Add shuffle buttons to AlbumDetailFragment & ArtistDetailFragment.
This commit is contained in:
@@ -6,4 +6,4 @@
|
||||
<solid android:color="@android:color/white" />
|
||||
</shape>
|
||||
</item>
|
||||
</ripple>
|
||||
</ripple>
|
||||
|
||||
@@ -65,6 +65,7 @@
|
||||
android:layout_marginEnd="@dimen/margin_medium"
|
||||
android:maxLines="1"
|
||||
android:text="@{album.name}"
|
||||
android:ellipsize="end"
|
||||
app:autoSizeMaxTextSize="@dimen/text_size_header_max"
|
||||
app:autoSizeMinTextSize="@dimen/text_size_min"
|
||||
app:autoSizeStepGranularity="@dimen/text_size_increment"
|
||||
@@ -108,12 +109,30 @@
|
||||
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"
|
||||
android:src="@drawable/ic_play"
|
||||
android:onClick="@{() -> playbackModel.play(album, false)}"
|
||||
android:src="@drawable/ic_play"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/album_details"
|
||||
app:layout_constraintDimensionRatio="1:1"
|
||||
app:layout_constraintEnd_toStartOf="@+id/album_shuffle"
|
||||
app:layout_constraintTop_toTopOf="@+id/album_artist" />
|
||||
|
||||
<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(album, true)}"
|
||||
android:src="@drawable/ic_shuffle_small"
|
||||
android:tint="@color/background"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/album_details"
|
||||
app:layout_constraintDimensionRatio="1:1"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
|
||||
@@ -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>
|
||||
Reference in New Issue
Block a user