mirror of
https://github.com/antebudimir/tempus.git
synced 2026-01-01 01:53:31 +00:00
feat: add sorting and search functionality for album and artist list
This commit is contained in:
parent
9e6926fc97
commit
48d9022f9a
12 changed files with 464 additions and 27 deletions
|
|
@ -33,17 +33,48 @@
|
|||
<TextView
|
||||
android:id="@+id/page_title_label"
|
||||
style="@style/TitleLarge"
|
||||
android:layout_width="0dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingTop="16dp"
|
||||
android:paddingEnd="16dp"
|
||||
android:paddingEnd="4dp"
|
||||
android:paddingBottom="24dp"
|
||||
android:text="@string/label_placeholder"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/page_subtitle_label"
|
||||
style="@style/TitleMedium"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="4dp"
|
||||
android:paddingTop="16dp"
|
||||
android:paddingEnd="16dp"
|
||||
android:paddingBottom="24dp"
|
||||
app:layout_constraintTop_toTopOf="@id/page_title_label"
|
||||
app:layout_constraintBottom_toBottomOf="@id/page_title_label"
|
||||
app:layout_constraintStart_toEndOf="@id/page_title_label" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/album_list_sort_image_view"
|
||||
style="@style/Widget.Material3.Button.TonalButton.Icon"
|
||||
android:layout_width="52dp"
|
||||
android:layout_height="52dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginBottom="12dp"
|
||||
android:insetLeft="0dp"
|
||||
android:insetTop="0dp"
|
||||
android:insetRight="0dp"
|
||||
android:insetBottom="0dp"
|
||||
app:cornerRadius="30dp"
|
||||
android:visibility="gone"
|
||||
app:icon="@drawable/ic_sort_list"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
|
|
|
|||
|
|
@ -33,17 +33,48 @@
|
|||
<TextView
|
||||
android:id="@+id/page_title_label"
|
||||
style="@style/TitleLarge"
|
||||
android:layout_width="0dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingTop="16dp"
|
||||
android:paddingEnd="16dp"
|
||||
android:paddingEnd="4dp"
|
||||
android:paddingBottom="24dp"
|
||||
android:text="@string/label_placeholder"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/page_subtitle_label"
|
||||
style="@style/TitleMedium"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="4dp"
|
||||
android:paddingTop="16dp"
|
||||
android:paddingEnd="16dp"
|
||||
android:paddingBottom="24dp"
|
||||
app:layout_constraintTop_toTopOf="@id/page_title_label"
|
||||
app:layout_constraintBottom_toBottomOf="@id/page_title_label"
|
||||
app:layout_constraintStart_toEndOf="@id/page_title_label" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/artist_list_sort_image_view"
|
||||
style="@style/Widget.Material3.Button.TonalButton.Icon"
|
||||
android:layout_width="52dp"
|
||||
android:layout_height="52dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginBottom="12dp"
|
||||
android:insetLeft="0dp"
|
||||
android:insetTop="0dp"
|
||||
android:insetRight="0dp"
|
||||
android:insetBottom="0dp"
|
||||
app:cornerRadius="30dp"
|
||||
android:visibility="gone"
|
||||
app:icon="@drawable/ic_sort_list"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
|
|
|
|||
12
app/src/main/res/menu/sort_horizontal_album_popup_menu.xml
Normal file
12
app/src/main/res/menu/sort_horizontal_album_popup_menu.xml
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item
|
||||
android:id="@+id/menu_horizontal_album_sort_name"
|
||||
android:title="@string/menu_sort_name" />
|
||||
<item
|
||||
android:id="@+id/menu_horizontal_album_sort_most_recently_starred"
|
||||
android:title="@string/menu_sort_most_recently_starred" />
|
||||
<item
|
||||
android:id="@+id/menu_horizontal_album_sort_least_recently_starred"
|
||||
android:title="@string/menu_sort_least_recently_starred" />
|
||||
</menu>
|
||||
12
app/src/main/res/menu/sort_horizontal_artist_popup_menu.xml
Normal file
12
app/src/main/res/menu/sort_horizontal_artist_popup_menu.xml
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item
|
||||
android:id="@+id/menu_horizontal_artist_sort_name"
|
||||
android:title="@string/menu_sort_name" />
|
||||
<item
|
||||
android:id="@+id/menu_horizontal_artist_sort_most_recently_starred"
|
||||
android:title="@string/menu_sort_most_recently_starred" />
|
||||
<item
|
||||
android:id="@+id/menu_horizontal_artist_sort_least_recently_starred"
|
||||
android:title="@string/menu_sort_least_recently_starred" />
|
||||
</menu>
|
||||
|
|
@ -90,6 +90,8 @@
|
|||
<string name="filter_info_selection">Select two or more filters</string>
|
||||
<string name="filter_title">Filter</string>
|
||||
<string name="filter_title_expanded">Filter Genres</string>
|
||||
<string name="generic_list_page_count">(%1$d)</string>
|
||||
<string name="generic_list_page_count_unknown">(+%1$d)</string>
|
||||
<string name="genre_catalogue_title">Genre Catalogue</string>
|
||||
<string name="genre_catalogue_title_expanded">Browse Genres</string>
|
||||
<string name="github_update_dialog_negative_button">Remind me later</string>
|
||||
|
|
@ -375,8 +377,6 @@
|
|||
<string name="song_list_page_starred">Starred tracks</string>
|
||||
<string name="song_list_page_top">%1$s\'s top tracks</string>
|
||||
<string name="song_list_page_year">Year %1$d</string>
|
||||
<string name="song_list_page_count">(%1$d)</string>
|
||||
<string name="song_list_page_count_unknown">(+%1$d)</string>
|
||||
<string name="song_subtitle_formatter">%1$s • %2$s %3$s</string>
|
||||
<string name="starred_sync_dialog_negative_button">Cancel</string>
|
||||
<string name="starred_sync_dialog_neutral_button">Continue</string>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue