Add menu drawables

This commit is contained in:
Adrian Ulrich 2018-11-02 20:49:52 +01:00
parent 62ea38873a
commit 0df0328eef
66 changed files with 15 additions and 15 deletions

View File

@ -635,51 +635,51 @@ public class LibraryActivity
// Add to playlist is always available.
fm.addSpacer(20);
fm.add(CTX_MENU_ADD_TO_PLAYLIST, 20, R.drawable.folder, R.string.add_to_playlist).setIntent(rowData);
fm.add(CTX_MENU_ADD_TO_PLAYLIST, 20, R.drawable.menu_add_to_playlist, R.string.add_to_playlist).setIntent(rowData);
if (rowData.getLongExtra(LibraryAdapter.DATA_ID, LibraryAdapter.INVALID_ID) == LibraryAdapter.HEADER_ID) {
fm.setHeaderTitle(getString(R.string.all_songs));
fm.add(CTX_MENU_PLAY_ALL, 10, R.drawable.folder, R.string.play_all).setIntent(rowData);
fm.add(CTX_MENU_ENQUEUE_ALL, 10, R.drawable.folder, R.string.enqueue_all).setIntent(rowData);
fm.add(CTX_MENU_PLAY_ALL, 10, R.drawable.menu_play_all, R.string.play_all).setIntent(rowData);
fm.add(CTX_MENU_ENQUEUE_ALL, 10, R.drawable.menu_enqueue, R.string.enqueue_all).setIntent(rowData);
} else {
int type = rowData.getIntExtra(LibraryAdapter.DATA_TYPE, MediaUtils.TYPE_INVALID);
fm.setHeaderTitle(rowData.getStringExtra(LibraryAdapter.DATA_TITLE));
if (type != MediaUtils.TYPE_FILE)
fm.add(CTX_MENU_ADD_TO_HOMESCREEN, 20, R.drawable.folder, R.string.add_to_homescreen).setIntent(rowData);
fm.add(CTX_MENU_ADD_TO_HOMESCREEN, 20, R.drawable.menu_add_to_homescreen, R.string.add_to_homescreen).setIntent(rowData);
if (FileUtils.canDispatchIntent(rowData))
fm.add(CTX_MENU_OPEN_EXTERNAL, 10, R.drawable.folder, R.string.open).setIntent(rowData);
fm.add(CTX_MENU_OPEN_EXTERNAL, 10, R.drawable.menu_launch, R.string.open).setIntent(rowData);
fm.add(CTX_MENU_PLAY, 0, R.drawable.folder, R.string.play).setIntent(rowData);
fm.add(CTX_MENU_PLAY, 0, R.drawable.menu_play, R.string.play).setIntent(rowData);
if (type <= MediaUtils.TYPE_SONG)
fm.add(CTX_MENU_PLAY_ALL, 1, R.drawable.folder, R.string.play_all).setIntent(rowData);
fm.add(CTX_MENU_PLAY_ALL, 1, R.drawable.menu_play_all, R.string.play_all).setIntent(rowData);
fm.add(CTX_MENU_ENQUEUE_AS_NEXT, 1, R.drawable.folder, R.string.enqueue_as_next).setIntent(rowData);
fm.add(CTX_MENU_ENQUEUE, 1, R.drawable.folder, R.string.enqueue).setIntent(rowData);
fm.add(CTX_MENU_ENQUEUE_AS_NEXT, 1, R.drawable.menu_enqueue_as_next, R.string.enqueue_as_next).setIntent(rowData);
fm.add(CTX_MENU_ENQUEUE, 1, R.drawable.menu_enqueue, R.string.enqueue).setIntent(rowData);
if (type == MediaUtils.TYPE_PLAYLIST) {
fm.add(CTX_MENU_RENAME_PLAYLIST, 0, R.drawable.folder, R.string.rename).setIntent(rowData);
} else if (rowData.getBooleanExtra(LibraryAdapter.DATA_EXPANDABLE, false)) {
fm.add(CTX_MENU_EXPAND, 2, R.drawable.folder, R.string.expand).setIntent(rowData);
fm.add(CTX_MENU_EXPAND, 2, R.drawable.menu_expand, R.string.expand).setIntent(rowData);
}
if (type == MediaUtils.TYPE_SONG || type == MediaUtils.TYPE_ALBUM) {
fm.addSpacer(30);
fm.add(CTX_MENU_MORE_FROM_ARTIST, 30, R.drawable.folder, R.string.more_from_artist).setIntent(rowData);
fm.add(CTX_MENU_MORE_FROM_ARTIST, 30, R.drawable.menu_artist, R.string.more_from_artist).setIntent(rowData);
if (type == MediaUtils.TYPE_SONG) {
fm.add(CTX_MENU_MORE_FROM_ALBUM, 30, R.drawable.folder, R.string.more_from_album).setIntent(rowData);
fm.add(CTX_MENU_SHOW_DETAILS, 99, R.drawable.folder, R.string.details).setIntent(rowData);
fm.add(CTX_MENU_MORE_FROM_ALBUM, 30, R.drawable.menu_album, R.string.more_from_album).setIntent(rowData);
fm.add(CTX_MENU_SHOW_DETAILS, 99, R.drawable.menu_details, R.string.details).setIntent(rowData);
if (PluginUtils.checkPlugins(this)) {
// not part of submenu: just last item in normal menu.
fm.add(CTX_MENU_PLUGINS, 99, R.drawable.folder, R.string.plugins).setIntent(rowData);
fm.add(CTX_MENU_PLUGINS, 99, R.drawable.menu_plugins, R.string.plugins).setIntent(rowData);
}
}
}
fm.addSpacer(90);
fm.add(CTX_MENU_DELETE, 90, R.drawable.folder, R.string.delete).setIntent(rowData);
fm.add(CTX_MENU_DELETE, 90, R.drawable.menu_delete, R.string.delete).setIntent(rowData);
}
return true;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 650 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 716 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1023 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 981 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 555 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1009 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 901 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 554 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 826 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 722 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 841 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 697 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 894 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 893 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.