Search in sources :

Example 1 with StorageBrowserFragment

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

the class AudioPlayerContainerActivity method onOptionsItemSelected.

@Override
public boolean onOptionsItemSelected(MenuItem item) {
    // Handle item selection
    switch(item.getItemId()) {
        case android.R.id.home:
            // Current fragment loaded
            final Fragment current = getCurrentFragment();
            if (current instanceof StorageBrowserFragment && ((StorageBrowserFragment) current).goBack())
                return true;
            finish();
            return true;
        default:
            return super.onOptionsItemSelected(item);
    }
}
Also used : StorageBrowserFragment(org.videolan.vlc.gui.browser.StorageBrowserFragment) Fragment(android.support.v4.app.Fragment) StorageBrowserFragment(org.videolan.vlc.gui.browser.StorageBrowserFragment)

Example 2 with StorageBrowserFragment

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

the class SecondaryActivity method fetchSecondaryFragment.

public void fetchSecondaryFragment(String id) {
    switch(id) {
        case ALBUMS_SONGS:
            mFragment = new AudioAlbumsSongsFragment();
            Bundle args = new Bundle();
            args.putParcelable(AudioBrowserFragment.TAG_ITEM, getIntent().getParcelableExtra(AudioBrowserFragment.TAG_ITEM));
            mFragment.setArguments(args);
            break;
        case ABOUT:
            mFragment = new AboutFragment();
            break;
        case VIDEO_GROUP_LIST:
            mFragment = new VideoGridFragment();
            ((VideoGridFragment) mFragment).setGroup(getIntent().getStringExtra("param"));
            break;
        case STORAGE_BROWSER:
            mFragment = new StorageBrowserFragment();
            break;
        default:
            throw new IllegalArgumentException("Wrong fragment id.");
    }
}
Also used : AudioAlbumsSongsFragment(org.videolan.vlc.gui.audio.AudioAlbumsSongsFragment) Bundle(android.os.Bundle) StorageBrowserFragment(org.videolan.vlc.gui.browser.StorageBrowserFragment) VideoGridFragment(org.videolan.vlc.gui.video.VideoGridFragment)

Example 3 with StorageBrowserFragment

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

the class AudioPlayerContainerActivity method onOptionsItemSelected.

@Override
public boolean onOptionsItemSelected(MenuItem item) {
    // Handle item selection
    switch(item.getItemId()) {
        case android.R.id.home:
            // Current fragment loaded
            final Fragment current = getCurrentFragment();
            if (current instanceof StorageBrowserFragment && ((StorageBrowserFragment) current).goBack())
                return true;
            finish();
            return true;
        default:
            return super.onOptionsItemSelected(item);
    }
}
Also used : StorageBrowserFragment(org.videolan.vlc.gui.browser.StorageBrowserFragment) Fragment(android.support.v4.app.Fragment) StorageBrowserFragment(org.videolan.vlc.gui.browser.StorageBrowserFragment)

Example 4 with StorageBrowserFragment

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

the class SecondaryActivity method fetchSecondaryFragment.

public void fetchSecondaryFragment(String id) {
    switch(id) {
        case ALBUMS_SONGS:
            mFragment = new AudioAlbumsSongsFragment();
            Bundle args = new Bundle();
            args.putParcelable(AudioBrowserFragment.TAG_ITEM, getIntent().getParcelableExtra(AudioBrowserFragment.TAG_ITEM));
            mFragment.setArguments(args);
            break;
        case ABOUT:
            mFragment = new AboutFragment();
            break;
        case VIDEO_GROUP_LIST:
            mFragment = new VideoGridFragment();
            ((VideoGridFragment) mFragment).setGroup(getIntent().getStringExtra("param"));
            break;
        case STORAGE_BROWSER:
            mFragment = new StorageBrowserFragment();
            break;
        default:
            throw new IllegalArgumentException("Wrong fragment id.");
    }
}
Also used : AudioAlbumsSongsFragment(org.videolan.vlc.gui.audio.AudioAlbumsSongsFragment) Bundle(android.os.Bundle) StorageBrowserFragment(org.videolan.vlc.gui.browser.StorageBrowserFragment) VideoGridFragment(org.videolan.vlc.gui.video.VideoGridFragment)

Aggregations

StorageBrowserFragment (org.videolan.vlc.gui.browser.StorageBrowserFragment)4 Bundle (android.os.Bundle)2 Fragment (android.support.v4.app.Fragment)2 AudioAlbumsSongsFragment (org.videolan.vlc.gui.audio.AudioAlbumsSongsFragment)2 VideoGridFragment (org.videolan.vlc.gui.video.VideoGridFragment)2