Fix album bugs

Fix bugs with the album items & detail fragments.
This commit is contained in:
OxygenCobalt
2020-09-27 17:03:35 -06:00
parent af4c32eb5b
commit aad42b5201
11 changed files with 68 additions and 27 deletions
@@ -77,7 +77,7 @@
android:layout_marginStart="@dimen/margin_medium"
android:clickable="true"
android:focusable="true"
android:onClick="@{() -> detailModel.updateArtist(album.artist)}"
android:onClick="@{() -> detailModel.doNavToParent()}"
android:text="@{album.artist.name}"
android:textAppearance="?android:attr/textAppearanceListItem"
android:textColor="?android:attr/textColorSecondary"
@@ -86,11 +86,10 @@
tools:text="Artist Name" />
<TextView
android:id="@+id/album_song_count"
android:id="@+id/album_details"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/margin_medium"
android:text="@{album.year != 0 ? String.valueOf(album.year) : @string/placeholder_no_date}"
android:textAppearance="?android:attr/textAppearanceListItem"
android:textColor="?android:attr/textColorSecondary"
app:albumDetails="@{album}"
@@ -112,7 +111,7 @@
android:text="@string/label_songs"
android:textAppearance="@style/TextAppearance.MaterialComponents.Overline"
android:textSize="16sp"
app:layout_constraintTop_toBottomOf="@+id/album_song_count" />
app:layout_constraintTop_toBottomOf="@+id/album_details" />
<ImageButton
android:id="@+id/album_sort_button"
@@ -127,9 +126,9 @@
android:paddingBottom="@dimen/padding_small"
android:onClick="@{() -> detailModel.incrementAlbumSortMode()}"
tools:src="@drawable/ic_sort_numeric_down"
app:layout_constraintBottom_toTopOf="@+id/album_recycler"
app:layout_constraintBottom_toTopOf="@+id/album_song_recycler"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@+id/album_song_count" />
app:layout_constraintTop_toBottomOf="@+id/album_details" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/album_song_recycler"
+1
View File
@@ -54,6 +54,7 @@
android:textAppearance="?android:attr/textAppearanceListItemSecondary"
android:textColor="?android:attr/textColorSecondary"
android:maxLines="1"
app:albumSongCount="@{album}"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toEndOf="@+id/album_cover"
app:layout_constraintTop_toBottomOf="@+id/album_name"
@@ -54,10 +54,10 @@
android:textAppearance="?android:attr/textAppearanceListItemSecondary"
android:textColor="?android:attr/textColorSecondary"
android:maxLines="1"
android:text="@{String.valueOf(album.year)}"
app:albumYear="@{album}"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toEndOf="@+id/album_cover"
app:layout_constraintTop_toBottomOf="@+id/album_name"
tools:text="10 Songs" />
tools:text="2020" />
</androidx.constraintlayout.widget.ConstraintLayout>
</layout>
+3
View File
@@ -72,6 +72,9 @@
<argument
android:name="albumId"
app:argType="long" />
<argument
android:name="fromLibrary"
app:argType="boolean" />
<action
android:id="@+id/action_show_parent_artist"
app:enterAnim="@anim/fragment_fade_enter"