Merge branch 'martindisch-playlist-export'
This commit is contained in:
commit
9c31d78251
15 changed files with 204 additions and 74 deletions
|
|
@ -1,5 +1,6 @@
|
|||
package com.kabouzeid.gramophone.adapter;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.PorterDuff;
|
||||
import android.os.Build;
|
||||
import android.support.annotation.LayoutRes;
|
||||
|
|
@ -11,8 +12,10 @@ import android.view.MenuItem;
|
|||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.PopupMenu;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.kabouzeid.appthemehelper.util.ATHUtil;
|
||||
import com.kabouzeid.gramophone.App;
|
||||
import com.kabouzeid.gramophone.R;
|
||||
import com.kabouzeid.gramophone.adapter.base.AbsMultiSelectAdapter;
|
||||
import com.kabouzeid.gramophone.adapter.base.MediaEntryViewHolder;
|
||||
|
|
@ -22,6 +25,7 @@ import com.kabouzeid.gramophone.helper.menu.PlaylistMenuHelper;
|
|||
import com.kabouzeid.gramophone.helper.menu.SongsMenuHelper;
|
||||
import com.kabouzeid.gramophone.interfaces.CabHolder;
|
||||
import com.kabouzeid.gramophone.loader.PlaylistSongLoader;
|
||||
import com.kabouzeid.gramophone.misc.WeakContextAsyncTask;
|
||||
import com.kabouzeid.gramophone.model.AbsCustomPlaylist;
|
||||
import com.kabouzeid.gramophone.model.Playlist;
|
||||
import com.kabouzeid.gramophone.model.Song;
|
||||
|
|
@ -29,7 +33,9 @@ import com.kabouzeid.gramophone.model.smartplaylist.AbsSmartPlaylist;
|
|||
import com.kabouzeid.gramophone.model.smartplaylist.LastAddedPlaylist;
|
||||
import com.kabouzeid.gramophone.util.MusicUtil;
|
||||
import com.kabouzeid.gramophone.util.NavigationUtil;
|
||||
import com.kabouzeid.gramophone.util.PlaylistsUtil;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
|
|
@ -149,12 +155,56 @@ public class PlaylistAdapter extends AbsMultiSelectAdapter<PlaylistAdapter.ViewH
|
|||
DeletePlaylistDialog.create(selection).show(activity.getSupportFragmentManager(), "DELETE_PLAYLIST");
|
||||
}
|
||||
break;
|
||||
case R.id.action_save_playlist:
|
||||
if (selection.size() == 1) {
|
||||
PlaylistMenuHelper.handleMenuClick(activity, selection.get(0), menuItem);
|
||||
} else {
|
||||
new SavePlaylistsAsyncTask(activity).execute(selection);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
SongsMenuHelper.handleMenuClick(activity, getSongList(selection), menuItem.getItemId());
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private static class SavePlaylistsAsyncTask extends WeakContextAsyncTask<ArrayList<Playlist>, String, String> {
|
||||
public SavePlaylistsAsyncTask(Context context) {
|
||||
super(context);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String doInBackground(ArrayList<Playlist>... params) {
|
||||
int successes = 0;
|
||||
int failures = 0;
|
||||
|
||||
String dir = "";
|
||||
|
||||
for (Playlist playlist : params[0]) {
|
||||
try {
|
||||
dir = PlaylistsUtil.savePlaylist(App.getInstance().getApplicationContext(), playlist).getParent();
|
||||
successes++;
|
||||
} catch (IOException e) {
|
||||
failures++;
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
return failures == 0
|
||||
? String.format(App.getInstance().getApplicationContext().getString(R.string.saved_x_playlists_to_x), successes, dir)
|
||||
: String.format(App.getInstance().getApplicationContext().getString(R.string.saved_x_playlists_to_x_failed_to_save_x), successes, dir, failures);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onPostExecute(String string) {
|
||||
super.onPostExecute(string);
|
||||
Context context = getContext();
|
||||
if (context != null) {
|
||||
Toast.makeText(context, string, Toast.LENGTH_LONG).show();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@NonNull
|
||||
private ArrayList<Song> getSongList(@NonNull List<Playlist> playlists) {
|
||||
final ArrayList<Song> songs = new ArrayList<>();
|
||||
|
|
|
|||
|
|
@ -31,37 +31,51 @@ public abstract class AbsMultiSelectAdapter<VH extends RecyclerView.ViewHolder,
|
|||
this.context = context;
|
||||
}
|
||||
|
||||
protected void overrideMultiSelectMenuRes(@MenuRes int menuRes) {
|
||||
protected void setMultiSelectMenuRes(@MenuRes int menuRes) {
|
||||
this.menuRes = menuRes;
|
||||
}
|
||||
|
||||
protected boolean toggleChecked(final int position) {
|
||||
if (cabHolder != null) {
|
||||
openCabIfNecessary();
|
||||
|
||||
I identifier = getIdentifier(position);
|
||||
if (identifier == null) return false;
|
||||
|
||||
if (!checked.remove(identifier)) checked.add(identifier);
|
||||
|
||||
notifyItemChanged(position);
|
||||
|
||||
final int size = checked.size();
|
||||
if (size <= 0) cab.finish();
|
||||
else if (size == 1) cab.setTitle(getName(checked.get(0)));
|
||||
else if (size > 1) cab.setTitle(context.getString(R.string.x_selected, size));
|
||||
|
||||
updateCab();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private void openCabIfNecessary() {
|
||||
protected void checkAll() {
|
||||
if (cabHolder != null) {
|
||||
checked.clear();
|
||||
for (int i = 0; i < getItemCount(); i++) {
|
||||
I identifier = getIdentifier(i);
|
||||
if (identifier != null) {
|
||||
checked.add(identifier);
|
||||
}
|
||||
}
|
||||
notifyDataSetChanged();
|
||||
updateCab();
|
||||
}
|
||||
}
|
||||
|
||||
private void updateCab() {
|
||||
if (cabHolder != null) {
|
||||
if (cab == null || !cab.isActive()) {
|
||||
cab = cabHolder.openCab(menuRes, this);
|
||||
}
|
||||
final int size = checked.size();
|
||||
if (size <= 0) cab.finish();
|
||||
else if (size == 1) cab.setTitle(getName(checked.get(0)));
|
||||
else cab.setTitle(context.getString(R.string.x_selected, size));
|
||||
}
|
||||
}
|
||||
|
||||
private void unCheckAll() {
|
||||
private void clearChecked() {
|
||||
checked.clear();
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
|
|
@ -81,15 +95,19 @@ public abstract class AbsMultiSelectAdapter<VH extends RecyclerView.ViewHolder,
|
|||
|
||||
@Override
|
||||
public boolean onCabItemClicked(MenuItem menuItem) {
|
||||
onMultipleItemAction(menuItem, new ArrayList<>(checked));
|
||||
cab.finish();
|
||||
unCheckAll();
|
||||
if (menuItem.getItemId() == R.id.action_multi_select_adapter_check_all) {
|
||||
checkAll();
|
||||
} else {
|
||||
onMultipleItemAction(menuItem, new ArrayList<>(checked));
|
||||
cab.finish();
|
||||
clearChecked();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onCabFinished(MaterialCab materialCab) {
|
||||
unCheckAll();
|
||||
clearChecked();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -97,6 +115,7 @@ public abstract class AbsMultiSelectAdapter<VH extends RecyclerView.ViewHolder,
|
|||
return object.toString();
|
||||
}
|
||||
|
||||
@Nullable
|
||||
protected abstract I getIdentifier(int position);
|
||||
|
||||
protected abstract void onMultipleItemAction(MenuItem menuItem, ArrayList<I> selection);
|
||||
|
|
|
|||
|
|
@ -53,10 +53,11 @@ public abstract class AbsOffsetSongAdapter extends SongAdapter {
|
|||
return super.getItemId(position);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
protected Song getIdentifier(int position) {
|
||||
position--;
|
||||
if (position < 0) return Song.EMPTY_SONG;
|
||||
if (position < 0) return null;
|
||||
return super.getIdentifier(position);
|
||||
}
|
||||
|
||||
|
|
@ -87,7 +88,8 @@ public abstract class AbsOffsetSongAdapter extends SongAdapter {
|
|||
|
||||
@Override
|
||||
protected Song getSong() {
|
||||
if (getItemViewType() == OFFSET_ITEM) return Song.EMPTY_SONG;
|
||||
if (getItemViewType() == OFFSET_ITEM)
|
||||
return Song.EMPTY_SONG; // could also return null, just to be safe return empty song
|
||||
return dataSet.get(getAdapterPosition() - 1);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ public class OrderablePlaylistSongAdapter extends PlaylistSongAdapter implements
|
|||
|
||||
public OrderablePlaylistSongAdapter(@NonNull AppCompatActivity activity, @NonNull ArrayList<PlaylistSong> dataSet, @LayoutRes int itemLayoutRes, boolean usePalette, @Nullable CabHolder cabHolder, @Nullable OnMoveItemListener onMoveItemListener) {
|
||||
super(activity, (ArrayList<Song>) (List) dataSet, itemLayoutRes, usePalette, cabHolder);
|
||||
overrideMultiSelectMenuRes(R.menu.menu_playlists_songs_selection);
|
||||
setMultiSelectMenuRes(R.menu.menu_playlists_songs_selection);
|
||||
this.onMoveItemListener = onMoveItemListener;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ public class PlaylistSongAdapter extends AbsOffsetSongAdapter {
|
|||
|
||||
public PlaylistSongAdapter(AppCompatActivity activity, @NonNull ArrayList<Song> dataSet, @LayoutRes int itemLayoutRes, boolean usePalette, @Nullable CabHolder cabHolder) {
|
||||
super(activity, dataSet, itemLayoutRes, usePalette, cabHolder, false);
|
||||
overrideMultiSelectMenuRes(R.menu.menu_cannot_delete_single_songs_playlist_songs_selection);
|
||||
setMultiSelectMenuRes(R.menu.menu_cannot_delete_single_songs_playlist_songs_selection);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -1,20 +1,20 @@
|
|||
package com.kabouzeid.gramophone.helper.menu;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.os.AsyncTask;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.view.MenuItem;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.kabouzeid.gramophone.App;
|
||||
import com.kabouzeid.gramophone.R;
|
||||
import com.kabouzeid.gramophone.dialogs.AddToPlaylistDialog;
|
||||
import com.kabouzeid.gramophone.dialogs.DeletePlaylistDialog;
|
||||
import com.kabouzeid.gramophone.dialogs.RenamePlaylistDialog;
|
||||
import com.kabouzeid.gramophone.helper.MusicPlayerRemote;
|
||||
import com.kabouzeid.gramophone.loader.PlaylistSongLoader;
|
||||
import com.kabouzeid.gramophone.misc.WeakContextAsyncTask;
|
||||
import com.kabouzeid.gramophone.model.AbsCustomPlaylist;
|
||||
import com.kabouzeid.gramophone.model.Playlist;
|
||||
import com.kabouzeid.gramophone.model.Song;
|
||||
|
|
@ -48,34 +48,7 @@ public class PlaylistMenuHelper {
|
|||
DeletePlaylistDialog.create(playlist).show(activity.getSupportFragmentManager(), "DELETE_PLAYLIST");
|
||||
return true;
|
||||
case R.id.action_save_playlist:
|
||||
@SuppressLint("ShowToast")
|
||||
final Toast toast = Toast.makeText(activity, R.string.saving_to_file, Toast.LENGTH_SHORT);
|
||||
new AsyncTask<Context, Void, String>() {
|
||||
@Override
|
||||
protected void onPreExecute() {
|
||||
super.onPreExecute();
|
||||
toast.show();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String doInBackground(Context... params) {
|
||||
try {
|
||||
return String.format(params[0].getString(R.string.saved_playlist_to), PlaylistsUtil.savePlaylist(params[0], playlist));
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
return String.format(params[0].getString(R.string.failed_to_save_playlist), e);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onPostExecute(String string) {
|
||||
super.onPostExecute(string);
|
||||
if (toast != null) {
|
||||
toast.setText(string);
|
||||
toast.show();
|
||||
}
|
||||
}
|
||||
}.execute(activity.getApplicationContext());
|
||||
new SavePlaylistAsyncTask(activity).execute(playlist);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
@ -87,4 +60,30 @@ public class PlaylistMenuHelper {
|
|||
((AbsCustomPlaylist) playlist).getSongs(activity) :
|
||||
PlaylistSongLoader.getPlaylistSongList(activity, playlist.id);
|
||||
}
|
||||
|
||||
|
||||
private static class SavePlaylistAsyncTask extends WeakContextAsyncTask<Playlist, String, String> {
|
||||
public SavePlaylistAsyncTask(Context context) {
|
||||
super(context);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String doInBackground(Playlist... params) {
|
||||
try {
|
||||
return String.format(App.getInstance().getApplicationContext().getString(R.string.saved_playlist_to), PlaylistsUtil.savePlaylist(App.getInstance().getApplicationContext(), params[0]));
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
return String.format(App.getInstance().getApplicationContext().getString(R.string.failed_to_save_playlist), e);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onPostExecute(String string) {
|
||||
super.onPostExecute(string);
|
||||
Context context = getContext();
|
||||
if (context != null) {
|
||||
Toast.makeText(context, string, Toast.LENGTH_LONG).show();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@ package com.kabouzeid.gramophone.misc;
|
|||
|
||||
import android.app.Dialog;
|
||||
import android.content.Context;
|
||||
import android.os.AsyncTask;
|
||||
import android.os.Handler;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.annotation.Nullable;
|
||||
|
|
@ -12,9 +11,8 @@ import java.lang.ref.WeakReference;
|
|||
/**
|
||||
* @author Karim Abou Zeid (kabouzeid)
|
||||
*/
|
||||
public abstract class DialogAsyncTask<Params, Progress, Result> extends AsyncTask<Params, Progress, Result> {
|
||||
public abstract class DialogAsyncTask<Params, Progress, Result> extends WeakContextAsyncTask<Params, Progress, Result> {
|
||||
private final int delay;
|
||||
private WeakReference<Context> contextWeakReference;
|
||||
private WeakReference<Dialog> dialogWeakReference;
|
||||
|
||||
private boolean supposedToBeDismissed;
|
||||
|
|
@ -24,8 +22,8 @@ public abstract class DialogAsyncTask<Params, Progress, Result> extends AsyncTas
|
|||
}
|
||||
|
||||
public DialogAsyncTask(Context context, int showDelay) {
|
||||
super(context);
|
||||
this.delay = showDelay;
|
||||
contextWeakReference = new WeakReference<>(context);
|
||||
dialogWeakReference = new WeakReference<>(null);
|
||||
}
|
||||
|
||||
|
|
@ -62,11 +60,6 @@ public abstract class DialogAsyncTask<Params, Progress, Result> extends AsyncTas
|
|||
protected void onProgressUpdate(@NonNull Dialog dialog, Progress... values) {
|
||||
}
|
||||
|
||||
@Nullable
|
||||
protected Context getContext() {
|
||||
return contextWeakReference.get();
|
||||
}
|
||||
|
||||
@Nullable
|
||||
protected Dialog getDialog() {
|
||||
return dialogWeakReference.get();
|
||||
|
|
|
|||
|
|
@ -0,0 +1,23 @@
|
|||
package com.kabouzeid.gramophone.misc;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.AsyncTask;
|
||||
import android.support.annotation.Nullable;
|
||||
|
||||
import java.lang.ref.WeakReference;
|
||||
|
||||
/**
|
||||
* @author Karim Abou Zeid (kabouzeid)
|
||||
*/
|
||||
public abstract class WeakContextAsyncTask<Params, Progress, Result> extends AsyncTask<Params, Progress, Result> {
|
||||
private WeakReference<Context> contextWeakReference;
|
||||
|
||||
public WeakContextAsyncTask(Context context) {
|
||||
contextWeakReference = new WeakReference<>(context);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
protected Context getContext() {
|
||||
return contextWeakReference.get();
|
||||
}
|
||||
}
|
||||
10
app/src/main/res/drawable/ic_select_all_white_24dp.xml
Normal file
10
app/src/main/res/drawable/ic_select_all_white_24dp.xml
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportHeight="24.0"
|
||||
android:viewportWidth="24.0">
|
||||
<path
|
||||
android:fillColor="#FFFFFF"
|
||||
android:pathData="M3,5h2L5,3c-1.1,0 -2,0.9 -2,2zM3,13h2v-2L3,11v2zM7,21h2v-2L7,19v2zM3,9h2L5,7L3,7v2zM13,3h-2v2h2L13,3zM19,3v2h2c0,-1.1 -0.9,-2 -2,-2zM5,21v-2L3,19c0,1.1 0.9,2 2,2zM3,17h2v-2L3,15v2zM9,3L7,3v2h2L9,3zM11,21h2v-2h-2v2zM19,13h2v-2h-2v2zM19,21c1.1,0 2,-0.9 2,-2h-2v2zM19,9h2L21,7h-2v2zM19,17h2v-2h-2v2zM15,21h2v-2h-2v2zM15,5h2L17,3h-2v2zM7,17h10L17,7L7,7v10zM9,9h6v6L9,15L9,9z" />
|
||||
</vector>
|
||||
|
|
@ -6,18 +6,24 @@
|
|||
android:id="@+id/action_play_next"
|
||||
android:icon="@drawable/ic_redo_white_24dp"
|
||||
android:title="@string/action_play_next"
|
||||
app:showAsAction="always" />
|
||||
app:showAsAction="ifRoom" />
|
||||
|
||||
<item
|
||||
android:id="@+id/action_add_to_current_playing"
|
||||
android:icon="@drawable/ic_library_add_white_24dp"
|
||||
android:title="@string/action_add_to_playing_queue"
|
||||
app:showAsAction="always" />
|
||||
app:showAsAction="ifRoom" />
|
||||
|
||||
<item
|
||||
android:id="@+id/action_add_to_playlist"
|
||||
android:icon="@drawable/ic_playlist_add_white_24dp"
|
||||
android:title="@string/action_add_to_playlist"
|
||||
app:showAsAction="always" />
|
||||
app:showAsAction="ifRoom" />
|
||||
|
||||
<item
|
||||
android:id="@id/action_multi_select_adapter_check_all"
|
||||
android:icon="@drawable/ic_select_all_white_24dp"
|
||||
android:title="Select all"
|
||||
app:showAsAction="ifRoom" />
|
||||
|
||||
</menu>
|
||||
|
|
@ -6,24 +6,30 @@
|
|||
android:id="@+id/action_play_next"
|
||||
android:icon="@drawable/ic_redo_white_24dp"
|
||||
android:title="@string/action_play_next"
|
||||
app:showAsAction="always" />
|
||||
app:showAsAction="ifRoom" />
|
||||
|
||||
<item
|
||||
android:id="@+id/action_add_to_current_playing"
|
||||
android:icon="@drawable/ic_library_add_white_24dp"
|
||||
android:title="@string/action_add_to_playing_queue"
|
||||
app:showAsAction="always" />
|
||||
app:showAsAction="ifRoom" />
|
||||
|
||||
<item
|
||||
android:id="@+id/action_add_to_playlist"
|
||||
android:icon="@drawable/ic_playlist_add_white_24dp"
|
||||
android:title="@string/action_add_to_playlist"
|
||||
app:showAsAction="always" />
|
||||
app:showAsAction="ifRoom" />
|
||||
|
||||
<item
|
||||
android:id="@+id/action_delete_from_device"
|
||||
android:icon="@drawable/ic_delete_white_24dp"
|
||||
android:title="@string/action_delete_from_device"
|
||||
app:showAsAction="always" />
|
||||
app:showAsAction="ifRoom" />
|
||||
|
||||
<item
|
||||
android:id="@id/action_multi_select_adapter_check_all"
|
||||
android:icon="@drawable/ic_select_all_white_24dp"
|
||||
android:title="Select all"
|
||||
app:showAsAction="ifRoom" />
|
||||
|
||||
</menu>
|
||||
|
|
@ -6,24 +6,36 @@
|
|||
android:id="@+id/action_play_next"
|
||||
android:icon="@drawable/ic_redo_white_24dp"
|
||||
android:title="@string/action_play_next"
|
||||
app:showAsAction="always" />
|
||||
app:showAsAction="ifRoom" />
|
||||
|
||||
<item
|
||||
android:id="@+id/action_add_to_current_playing"
|
||||
android:icon="@drawable/ic_library_add_white_24dp"
|
||||
android:title="@string/action_add_to_playing_queue"
|
||||
app:showAsAction="always" />
|
||||
app:showAsAction="ifRoom" />
|
||||
|
||||
<item
|
||||
android:id="@+id/action_add_to_playlist"
|
||||
android:icon="@drawable/ic_playlist_add_white_24dp"
|
||||
android:title="@string/action_add_to_playlist"
|
||||
app:showAsAction="always" />
|
||||
app:showAsAction="ifRoom" />
|
||||
|
||||
<item
|
||||
android:id="@+id/action_save_playlist"
|
||||
android:icon="@drawable/ic_save_white_24dp"
|
||||
android:title="@string/save_playlists_title"
|
||||
app:showAsAction="never" />
|
||||
|
||||
<item
|
||||
android:id="@+id/action_delete_playlist"
|
||||
android:icon="@drawable/ic_delete_white_24dp"
|
||||
android:title="@string/delete_playlists_title"
|
||||
app:showAsAction="always" />
|
||||
app:showAsAction="ifRoom" />
|
||||
|
||||
<item
|
||||
android:id="@id/action_multi_select_adapter_check_all"
|
||||
android:icon="@drawable/ic_select_all_white_24dp"
|
||||
android:title="Select all"
|
||||
app:showAsAction="ifRoom" />
|
||||
|
||||
</menu>
|
||||
|
|
@ -6,24 +6,30 @@
|
|||
android:id="@+id/action_play_next"
|
||||
android:icon="@drawable/ic_redo_white_24dp"
|
||||
android:title="@string/action_play_next"
|
||||
app:showAsAction="always" />
|
||||
app:showAsAction="ifRoom" />
|
||||
|
||||
<item
|
||||
android:id="@+id/action_add_to_current_playing"
|
||||
android:icon="@drawable/ic_library_add_white_24dp"
|
||||
android:title="@string/action_add_to_playing_queue"
|
||||
app:showAsAction="always" />
|
||||
app:showAsAction="ifRoom" />
|
||||
|
||||
<item
|
||||
android:id="@+id/action_add_to_playlist"
|
||||
android:icon="@drawable/ic_playlist_add_white_24dp"
|
||||
android:title="@string/action_add_to_playlist"
|
||||
app:showAsAction="always" />
|
||||
app:showAsAction="ifRoom" />
|
||||
|
||||
<item
|
||||
android:id="@+id/action_remove_from_playlist"
|
||||
android:icon="@drawable/ic_delete_white_24dp"
|
||||
android:title="@string/action_remove_from_playlist"
|
||||
app:showAsAction="always" />
|
||||
app:showAsAction="ifRoom" />
|
||||
|
||||
<item
|
||||
android:id="@id/action_multi_select_adapter_check_all"
|
||||
android:icon="@drawable/ic_select_all_white_24dp"
|
||||
android:title="Select all"
|
||||
app:showAsAction="ifRoom" />
|
||||
|
||||
</menu>
|
||||
|
|
@ -14,4 +14,6 @@
|
|||
<item name="action_song_sort_order_artist" type="id" />
|
||||
<item name="action_song_sort_order_album" type="id" />
|
||||
<item name="action_song_sort_order_year" type="id" />
|
||||
|
||||
<item name="action_multi_select_adapter_check_all" type="id" />
|
||||
</resources>
|
||||
|
|
@ -48,7 +48,6 @@
|
|||
<string name="lyrics">Lyrics</string>
|
||||
<string name="album_or_artist_empty">The title or artist is empty.</string>
|
||||
<string name="saving_changes">Saving changes</string>
|
||||
<string name="saving_to_file">Saving to file…</string>
|
||||
<string name="label_details">Details</string>
|
||||
<string name="label_file_name">File name</string>
|
||||
<string name="label_file_path">File path</string>
|
||||
|
|
@ -88,6 +87,7 @@
|
|||
<string name="delete_playlists_title">Delete playlists</string>
|
||||
<string name="clear_playlist_title">Clear playlist</string>
|
||||
<string name="save_playlist_title">Save as file</string>
|
||||
<string name="save_playlists_title">Save as files</string>
|
||||
<string name="add_playlist_title">"Add to playlist"</string>
|
||||
<string name="action_shuffle_all">Shuffle all</string>
|
||||
<string name="action_shuffle_album">Shuffle album</string>
|
||||
|
|
@ -233,6 +233,8 @@
|
|||
<string name="folders">Folders</string>
|
||||
<string name="saved_playlist_to">Saved playlist to %s.</string>
|
||||
<string name="failed_to_save_playlist">Failed to save playlist (%s).</string>
|
||||
<string name="saved_x_playlists_to_x">Saved %1$d playlists to %2$s.</string>
|
||||
<string name="saved_x_playlists_to_x_failed_to_save_x">Saved %1$d playlists to %2$s, failed to save %3$d.</string>
|
||||
<string name="not_listed_in_media_store"><![CDATA[<b>%s</b> is not listed in the media store.]]></string>
|
||||
<string name="some_files_are_not_listed_in_the_media_store">Some files are not listed in the media store.</string>
|
||||
<string name="nothing_to_scan">Nothing to scan.</string>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue