Heavily refactor music loading
Heavily change how music loading works so that artists arent redundantly loaded, genres are primarily song-based instead of genre based, and songs are now bound to their correct genres.
This commit is contained in:
@@ -54,7 +54,7 @@
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:src="@drawable/ic_album" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
<TextView
|
||||
android:id="@+id/album_name"
|
||||
style="@style/DetailTitleText"
|
||||
android:layout_width="0dp"
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:src="@drawable/ic_artist" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
<TextView
|
||||
android:id="@+id/artist_name"
|
||||
style="@style/DetailTitleText"
|
||||
android:layout_width="0dp"
|
||||
|
||||
@@ -54,6 +54,7 @@
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:src="@drawable/ic_genre" />
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/genre_name"
|
||||
style="@style/DetailTitleText"
|
||||
@@ -94,10 +95,10 @@
|
||||
tools:text="80 Songs" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/genre_artist_header"
|
||||
android:id="@+id/genre_song_header"
|
||||
style="@style/HeaderText"
|
||||
android:layout_marginTop="@dimen/padding_medium"
|
||||
android:text="@string/label_artists"
|
||||
android:text="@string/label_songs"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/genre_song_count" />
|
||||
|
||||
@@ -106,13 +107,13 @@
|
||||
style="@style/HeaderAction"
|
||||
android:contentDescription="@string/description_sort_button"
|
||||
android:onClick="@{() -> detailModel.incrementGenreSortMode()}"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/genre_artist_header"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/genre_song_header"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/genre_artist_header"
|
||||
app:layout_constraintTop_toTopOf="@+id/genre_song_header"
|
||||
tools:src="@drawable/ic_sort_alpha_down" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/genre_artist_recycler"
|
||||
android:id="@+id/genre_song_recycler"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
@@ -121,9 +122,9 @@
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/genre_artist_header"
|
||||
app:layout_constraintTop_toBottomOf="@+id/genre_song_header"
|
||||
tools:itemCount="4"
|
||||
tools:listitem="@layout/item_artist" />
|
||||
tools:listitem="@layout/item_song" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
||||
@@ -38,12 +38,12 @@
|
||||
<TextView
|
||||
android:id="@+id/genre_count"
|
||||
style="@style/ItemText.Secondary"
|
||||
app:genreCounts="@{genre}"
|
||||
app:altGenreCounts="@{genre}"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/genre_image"
|
||||
app:layout_constraintTop_toBottomOf="@+id/genre_name"
|
||||
tools:text="2 Artists, 4 Albums" />
|
||||
tools:text="4 Albums, 40 Songs" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</layout>
|
||||
Reference in New Issue
Block a user