Search in sources :

Example 1 with EqualizerFragment

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

the class AdvOptionsDialog method showFragment.

private void showFragment(int id) {
    DialogFragment newFragment;
    String tag;
    switch(id) {
        case ID_PLAYBACK_SPEED:
            newFragment = PlaybackSpeedDialog.newInstance();
            tag = "playback_speed";
            break;
        case ID_JUMP_TO:
            newFragment = JumpToTimeDialog.newInstance();
            tag = "time";
            break;
        case ID_SLEEP:
            newFragment = SleepTimerDialog.newInstance();
            tag = "time";
            break;
        case ID_CHAPTER_TITLE:
            newFragment = SelectChapterDialog.newInstance();
            tag = "select_chapter";
            break;
        case ID_EQUALIZER:
            newFragment = new EqualizerFragment();
            tag = "equalizer";
            break;
        case ID_SAVE_PLAYLIST:
            UiTools.savePlaylist(getActivity(), mService.getMedias());
            dismiss();
            return;
        default:
            return;
    }
    newFragment.show(getActivity().getSupportFragmentManager(), tag);
    dismiss();
}
Also used : DialogFragment(android.support.v4.app.DialogFragment) EqualizerFragment(org.videolan.vlc.gui.audio.EqualizerFragment)

Example 2 with EqualizerFragment

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

the class AdvOptionsDialog method showFragment.

private void showFragment(int id) {
    DialogFragment newFragment;
    String tag;
    switch(id) {
        case ID_PLAYBACK_SPEED:
            newFragment = PlaybackSpeedDialog.newInstance();
            tag = "playback_speed";
            break;
        case ID_JUMP_TO:
            newFragment = JumpToTimeDialog.newInstance();
            tag = "time";
            break;
        case ID_SLEEP:
            newFragment = SleepTimerDialog.newInstance();
            tag = "time";
            break;
        case ID_CHAPTER_TITLE:
            newFragment = SelectChapterDialog.newInstance();
            tag = "select_chapter";
            break;
        case ID_EQUALIZER:
            newFragment = new EqualizerFragment();
            tag = "equalizer";
            break;
        case ID_SAVE_PLAYLIST:
            UiTools.savePlaylist(getActivity(), mService.getMedias());
            dismiss();
            return;
        default:
            return;
    }
    newFragment.show(getActivity().getSupportFragmentManager(), tag);
    dismiss();
}
Also used : DialogFragment(android.support.v4.app.DialogFragment) EqualizerFragment(org.videolan.vlc.gui.audio.EqualizerFragment)

Example 3 with EqualizerFragment

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

the class ContentActivity method onOptionsItemSelected.

@Override
public boolean onOptionsItemSelected(MenuItem item) {
    // Handle item selection
    switch(item.getItemId()) {
        case R.id.ml_menu_equalizer:
            new EqualizerFragment().show(getSupportFragmentManager(), "equalizer");
            return true;
        case R.id.ml_menu_search:
            startActivity(new Intent(Intent.ACTION_SEARCH, null, this, SearchActivity.class));
            return true;
        case R.id.ml_menu_renderers:
            if (mService != null && !mService.hasRenderer() && RendererDelegate.INSTANCE.getRenderers().size() == 1) {
                final RendererItem renderer = RendererDelegate.INSTANCE.getRenderers().get(0);
                RendererDelegate.INSTANCE.selectRenderer(renderer);
                mService.setRenderer(renderer);
                final View v = findViewById(R.id.audio_player_container);
                if (v != null)
                    UiTools.snacker(v, getString(R.string.casting_connected_renderer, renderer.displayName));
            } else if (getSupportFragmentManager().findFragmentByTag("renderers") == null)
                new RenderersDialog().show(getSupportFragmentManager(), "renderers");
            return true;
        default:
            return super.onOptionsItemSelected(item);
    }
}
Also used : RenderersDialog(org.videolan.vlc.gui.dialogs.RenderersDialog) Intent(android.content.Intent) RendererItem(org.videolan.libvlc.RendererItem) SearchView(android.support.v7.widget.SearchView) View(android.view.View) EqualizerFragment(org.videolan.vlc.gui.audio.EqualizerFragment)

Example 4 with EqualizerFragment

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

the class ContentActivity method onOptionsItemSelected.

@Override
public boolean onOptionsItemSelected(MenuItem item) {
    // Handle item selection
    switch(item.getItemId()) {
        case R.id.ml_menu_equalizer:
            new EqualizerFragment().show(getSupportFragmentManager(), "equalizer");
            return true;
        case R.id.ml_menu_search:
            startActivity(new Intent(Intent.ACTION_SEARCH, null, this, SearchActivity.class));
            return true;
        case R.id.ml_menu_renderers:
            if (!RendererDelegate.INSTANCE.hasRenderer() && RendererDelegate.INSTANCE.getRenderers().getValue().size() == 1) {
                final RendererItem renderer = RendererDelegate.INSTANCE.getRenderers().getValue().get(0);
                RendererDelegate.INSTANCE.selectRenderer(renderer);
                final View v = findViewById(R.id.audio_player_container);
                if (v != null)
                    UiTools.snacker(v, getString(R.string.casting_connected_renderer, renderer.displayName));
            } else if (getSupportFragmentManager().findFragmentByTag("renderers") == null)
                new RenderersDialog().show(getSupportFragmentManager(), "renderers");
            return true;
        default:
            return super.onOptionsItemSelected(item);
    }
}
Also used : RenderersDialog(org.videolan.vlc.gui.dialogs.RenderersDialog) Intent(android.content.Intent) RendererItem(org.videolan.libvlc.RendererItem) SearchView(android.support.v7.widget.SearchView) View(android.view.View) EqualizerFragment(org.videolan.vlc.gui.audio.EqualizerFragment)

Aggregations

EqualizerFragment (org.videolan.vlc.gui.audio.EqualizerFragment)4 Intent (android.content.Intent)2 DialogFragment (android.support.v4.app.DialogFragment)2 SearchView (android.support.v7.widget.SearchView)2 View (android.view.View)2 RendererItem (org.videolan.libvlc.RendererItem)2 RenderersDialog (org.videolan.vlc.gui.dialogs.RenderersDialog)2