Search in sources :

Example 1 with AudioPlayerContainerActivity

use of org.videolan.vlc.gui.AudioPlayerContainerActivity in project vlc-android by videolan.

the class FileBrowserFragment method handleContextItemSelected.

@Override
protected boolean handleContextItemSelected(MenuItem item, int position) {
    if (mRoot && item.getItemId() == R.id.directory_remove_custom_path) {
        Storage storage = (Storage) mAdapter.getItem(position);
        MediaDatabase.getInstance().recursiveRemoveDir(storage.getUri().getPath());
        CustomDirectories.removeCustomDirectory(storage.getUri().getPath());
        mAdapter.removeItem(position);
        ((AudioPlayerContainerActivity) getActivity()).updateLib();
        return true;
    } else
        return super.handleContextItemSelected(item, position);
}
Also used : AudioPlayerContainerActivity(org.videolan.vlc.gui.AudioPlayerContainerActivity) Storage(org.videolan.medialibrary.media.Storage)

Example 2 with AudioPlayerContainerActivity

use of org.videolan.vlc.gui.AudioPlayerContainerActivity in project vlc-android by GeoffreyMetais.

the class FileBrowserFragment method handleContextItemSelected.

@Override
protected boolean handleContextItemSelected(MenuItem item, int position) {
    if (mRoot && item.getItemId() == R.id.directory_remove_custom_path) {
        Storage storage = (Storage) mAdapter.getItem(position);
        MediaDatabase.getInstance().recursiveRemoveDir(storage.getUri().getPath());
        CustomDirectories.removeCustomDirectory(storage.getUri().getPath());
        mProvider.remove(storage);
        ((AudioPlayerContainerActivity) getActivity()).updateLib();
        return true;
    } else
        return super.handleContextItemSelected(item, position);
}
Also used : AudioPlayerContainerActivity(org.videolan.vlc.gui.AudioPlayerContainerActivity) Storage(org.videolan.medialibrary.media.Storage)

Aggregations

Storage (org.videolan.medialibrary.media.Storage)2 AudioPlayerContainerActivity (org.videolan.vlc.gui.AudioPlayerContainerActivity)2