music: implement exporting frontend
Implement the exporting dialog and flow in all places in the app.
This commit is contained in:
@@ -7,5 +7,5 @@
|
||||
android:tint="?attr/colorControlNormal">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M240,880Q207,880 183.5,856.5Q160,833 160,800L160,160Q160,127 183.5,103.5Q207,80 240,80L560,80L800,320L800,800Q800,833 776.5,856.5Q753,880 720,880L240,880ZM520,360L520,160L240,160Q240,160 240,160Q240,160 240,160L240,800Q240,800 240,800Q240,800 240,800L720,800Q720,800 720,800Q720,800 720,800L720,360L520,360ZM240,160L240,160L240,360L240,360L240,160L240,360L240,360L240,800Q240,800 240,800Q240,800 240,800L240,800Q240,800 240,800Q240,800 240,800L240,160Q240,160 240,160Q240,160 240,160Z"/>
|
||||
android:pathData="M440,760L520,760L520,593L584,657L640,600L480,440L320,600L377,656L440,593L440,760ZM240,880Q207,880 183.5,856.5Q160,833 160,800L160,160Q160,127 183.5,103.5Q207,80 240,80L560,80L800,320L800,800Q800,833 776.5,856.5Q753,880 720,880L240,880ZM520,360L520,160L240,160Q240,160 240,160Q240,160 240,160L240,800Q240,800 240,800Q240,800 240,800L720,800Q720,800 720,800Q720,800 720,800L720,360L520,360ZM240,160L240,160L240,360L240,360L240,160L240,360L240,360L240,800Q240,800 240,800Q240,800 240,800L240,800Q240,800 240,800Q240,800 240,800L240,160Q240,160 240,160Q240,160 240,160Z"/>
|
||||
</vector>
|
||||
|
||||
@@ -1,6 +1,78 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
<LinearLayout 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="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
<TextView
|
||||
android:id="@+id/export_paths_header"
|
||||
style="@style/Widget.Auxio.TextView.Header"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="@dimen/spacing_large"
|
||||
android:paddingEnd="@dimen/spacing_large"
|
||||
android:text="@string/lbl_path_style"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
|
||||
<com.google.android.material.button.MaterialButtonToggleGroup
|
||||
android:id="@+id/export_paths_group"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/spacing_large"
|
||||
android:layout_marginTop="@dimen/spacing_tiny"
|
||||
android:layout_marginEnd="@dimen/spacing_large"
|
||||
android:gravity="center"
|
||||
app:checkedButton="@+id/export_relative_paths"
|
||||
app:layout_constraintTop_toBottomOf="@+id/export_paths_header"
|
||||
app:selectionRequired="true"
|
||||
app:singleSelection="true">
|
||||
|
||||
<org.oxycblt.auxio.ui.RippleFixMaterialButton
|
||||
android:id="@+id/export_relative_paths"
|
||||
style="@style/Widget.Material3.Button.OutlinedButton"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/lbl_path_style_relative"
|
||||
tools:icon="@drawable/ic_check_24" />
|
||||
|
||||
<org.oxycblt.auxio.ui.RippleFixMaterialButton
|
||||
android:id="@+id/export_absolute_paths"
|
||||
style="@style/Widget.Material3.Button.OutlinedButton"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/lbl_path_style_absolute"/>
|
||||
|
||||
|
||||
</com.google.android.material.button.MaterialButtonToggleGroup>
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:orientation="horizontal"
|
||||
android:paddingTop="@dimen/spacing_tiny"
|
||||
android:paddingBottom="@dimen/spacing_tiny">
|
||||
|
||||
<com.google.android.material.checkbox.MaterialCheckBox
|
||||
android:id="@+id/export_windows_paths"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/spacing_medium"
|
||||
android:layout_marginEnd="@dimen/spacing_mid_medium"
|
||||
android:clickable="false"
|
||||
android:focusable="false"
|
||||
android:paddingStart="@dimen/spacing_medium"
|
||||
android:textAlignment="viewStart"
|
||||
android:textAppearance="@style/TextAppearance.Auxio.BodyLarge"
|
||||
tools:ignore="RtlSymmetry,contentDescription"
|
||||
android:text="@string/lbl_windows_paths" />
|
||||
</FrameLayout>
|
||||
|
||||
</LinearLayout>
|
||||
@@ -24,6 +24,10 @@
|
||||
android:id="@+id/action_rename"
|
||||
android:title="@string/lbl_rename"
|
||||
android:icon="@drawable/ic_edit_24"/>
|
||||
<item
|
||||
android:id="@+id/action_playlist_export"
|
||||
android:title="@string/lbl_export"
|
||||
android:icon="@drawable/ic_save_24"/>
|
||||
<item
|
||||
android:id="@+id/action_delete"
|
||||
android:title="@string/lbl_delete"
|
||||
|
||||
@@ -66,6 +66,9 @@
|
||||
<action
|
||||
android:id="@+id/rename_playlist"
|
||||
app:destination="@id/rename_playlist_dialog" />
|
||||
<action
|
||||
android:id="@+id/export_playlist"
|
||||
app:destination="@id/export_playlist_dialog" />
|
||||
<action
|
||||
android:id="@+id/delete_playlist"
|
||||
app:destination="@id/delete_playlist_dialog" />
|
||||
@@ -180,6 +183,9 @@
|
||||
<action
|
||||
android:id="@+id/delete_playlist"
|
||||
app:destination="@id/delete_playlist_dialog" />
|
||||
<action
|
||||
android:id="@+id/export_playlist"
|
||||
app:destination="@id/export_playlist_dialog" />
|
||||
<action
|
||||
android:id="@+id/add_to_playlist"
|
||||
app:destination="@id/add_to_playlist_dialog" />
|
||||
@@ -376,6 +382,9 @@
|
||||
<action
|
||||
android:id="@+id/rename_playlist"
|
||||
app:destination="@id/rename_playlist_dialog" />
|
||||
<action
|
||||
android:id="@+id/export_playlist"
|
||||
app:destination="@id/export_playlist_dialog" />
|
||||
<action
|
||||
android:id="@+id/delete_playlist"
|
||||
app:destination="@id/delete_playlist_dialog" />
|
||||
@@ -416,6 +425,16 @@
|
||||
app:argType="org.oxycblt.auxio.music.Music$UID" />
|
||||
</dialog>
|
||||
|
||||
<dialog
|
||||
android:id="@+id/export_playlist_dialog"
|
||||
android:name="org.oxycblt.auxio.music.decision.ExportPlaylistDialog"
|
||||
android:label="rename_playlist_dialog"
|
||||
tools:layout="@layout/dialog_playlist_name">
|
||||
<argument
|
||||
android:name="playlistUid"
|
||||
app:argType="org.oxycblt.auxio.music.Music$UID" />
|
||||
</dialog>
|
||||
|
||||
<dialog
|
||||
android:id="@+id/delete_playlist_dialog"
|
||||
android:name="org.oxycblt.auxio.music.decision.DeletePlaylistDialog"
|
||||
|
||||
@@ -90,6 +90,8 @@
|
||||
<string name="lbl_new_playlist">New playlist</string>
|
||||
<string name="lbl_empty_playlist">Empty playlist</string>
|
||||
<string name="lbl_import_playlist">Imported playlist</string>
|
||||
<string name="lbl_export">Export</string>
|
||||
<string name="lbl_export_playlist">Export playlist</string>
|
||||
<string name="lbl_rename">Rename</string>
|
||||
<string name="lbl_rename_playlist">Rename playlist</string>
|
||||
<string name="lbl_delete">Delete</string>
|
||||
@@ -157,6 +159,12 @@
|
||||
<!-- As in to add a new folder in the "Music folders" setting -->
|
||||
<string name="lbl_add">Add</string>
|
||||
|
||||
<string name="lbl_path_style">Path style</string>
|
||||
<string name="lbl_path_style_absolute">Absolute</string>
|
||||
<string name="lbl_path_style_relative">Relative</string>
|
||||
|
||||
<string name="lbl_windows_paths">Use Windows-compatible paths</string>
|
||||
|
||||
<!-- Referring to playback state -->
|
||||
<string name="lbl_state_saved">State saved</string>
|
||||
<!-- Referring to playback state -->
|
||||
@@ -310,7 +318,8 @@
|
||||
<string name="err_no_music">No music found</string>
|
||||
<string name="err_index_failed">Music loading failed</string>
|
||||
<string name="err_no_perms">Auxio needs permission to read your music library</string>
|
||||
<string name="err_import_failed">Could not import a playlist from this file</string>
|
||||
<string name="err_import_failed">Unable to import a playlist from this file</string>
|
||||
<string name="err_export_failed">Unable to export the playlist to this file</string>
|
||||
<string name="err_no_app">No app found that can handle this task</string>
|
||||
<!-- No folders in the "Music Folders" setting -->
|
||||
<string name="err_no_dirs">No folders</string>
|
||||
|
||||
Reference in New Issue
Block a user