music: add picker dialog
Add a dialog for picking a genre from several choices. This basically completes multi-genre support in Auxio, save more internal reworks. Note that it is extremely likely that the "Play from genre" setting will be removed soon. This feature has made me realize that such does not many any real sense, as genres are more semantically similar to playlists than artists or albums. This implementation only exists to make multi-artist support an easy plug-and-play operation. Resolves #201
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<org.oxycblt.auxio.ui.recycler.DialogRecyclerView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/picker_recycler"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||
tools:listitem="@layout/item_picker_choice" />
|
||||
@@ -0,0 +1,35 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:paddingStart="@dimen/spacing_mid_large"
|
||||
android:paddingTop="@dimen/spacing_medium"
|
||||
android:paddingEnd="@dimen/spacing_mid_large"
|
||||
android:paddingBottom="@dimen/spacing_medium">
|
||||
|
||||
<org.oxycblt.auxio.image.ImageGroup
|
||||
android:id="@+id/picker_image"
|
||||
style="@style/Widget.Auxio.Image.Small"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:staticIcon="@drawable/ic_song_24" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/picker_name"
|
||||
style="@style/Widget.Auxio.TextView.Item.Primary"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/spacing_mid_medium"
|
||||
android:textColor="@color/sel_accented_primary"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/picker_image"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_chainStyle="packed"
|
||||
tools:text="Artist" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -17,8 +17,24 @@
|
||||
<action
|
||||
android:id="@+id/action_show_details"
|
||||
app:destination="@id/song_detail_dialog" />
|
||||
<action
|
||||
android:id="@+id/show_genre_picker_dialog"
|
||||
app:destination="@id/genre_picker_dialog" />
|
||||
</fragment>
|
||||
|
||||
<dialog
|
||||
android:id="@+id/genre_picker_dialog"
|
||||
android:name="org.oxycblt.auxio.music.picker.GenrePickerDialog"
|
||||
android:label="genre_picker_dialog"
|
||||
tools:layout="@layout/dialog_music_picker">
|
||||
<argument
|
||||
android:name="songUid"
|
||||
app:argType="org.oxycblt.auxio.music.Music$UID" />
|
||||
<argument
|
||||
android:name="pickerMode"
|
||||
app:argType="org.oxycblt.auxio.music.picker.PickerMode" />
|
||||
</dialog>
|
||||
|
||||
<dialog
|
||||
android:id="@+id/song_detail_dialog"
|
||||
android:name="org.oxycblt.auxio.detail.SongDetailDialog"
|
||||
@@ -67,12 +83,12 @@
|
||||
tools:layout="@layout/dialog_pre_amp" />
|
||||
<dialog
|
||||
android:id="@+id/music_dirs_dialog"
|
||||
android:name="org.oxycblt.auxio.music.settings.MusicDirsDialog"
|
||||
android:name="org.oxycblt.auxio.music.dirs.MusicDirsDialog"
|
||||
android:label="music_dirs_dialog"
|
||||
tools:layout="@layout/dialog_music_dirs" />
|
||||
<dialog
|
||||
android:id="@+id/separators_dialog"
|
||||
android:name="org.oxycblt.auxio.music.settings.SeparatorsDialog"
|
||||
android:name="org.oxycblt.auxio.music.separators.SeparatorsDialog"
|
||||
android:label="music_dirs_dialog"
|
||||
tools:layout="@layout/dialog_separators" />
|
||||
|
||||
|
||||
@@ -102,8 +102,11 @@
|
||||
<string name="lbl_play_next">Play next</string>
|
||||
<string name="lbl_queue_add">Add to queue</string>
|
||||
|
||||
<string name="lbl_go_genre">Go to genre</string>
|
||||
<string name="lbl_go_artist">Go to artist</string>
|
||||
<string name="lbl_go_album">Go to album</string>
|
||||
<string name="lbl_play_genre">Play from genre</string>
|
||||
<string name="lbl_play_artist">Play from artist</string>
|
||||
<string name="lbl_song_detail">View properties</string>
|
||||
|
||||
<string name="lbl_props">Song properties</string>
|
||||
@@ -203,8 +206,8 @@
|
||||
<string name="set_playback_mode_none">Play from shown item</string>
|
||||
<string name="set_playback_mode_all">Play from all songs</string>
|
||||
<string name="set_playback_mode_album">Play from album</string>
|
||||
<string name="set_playback_mode_artist">Play from artist</string>
|
||||
<string name="set_playback_mode_genre">Play from genre</string>
|
||||
<string name="set_playback_mode_artist">@string/lbl_play_artist</string>
|
||||
<string name="set_playback_mode_genre">@string/lbl_play_genre</string>
|
||||
<string name="set_keep_shuffle">Remember shuffle</string>
|
||||
<string name="set_keep_shuffle_desc">Keep shuffle on when playing a new song</string>
|
||||
<string name="set_rewind_prev">Rewind before skipping back</string>
|
||||
|
||||
Reference in New Issue
Block a user