use of org.videolan.vlc.interfaces.Filterable in project vlc-android by videolan.
the class ContentActivity method onCreateOptionsMenu.
@Override
public boolean onCreateOptionsMenu(Menu menu) {
mMenu = menu;
if (getSupportFragmentManager().findFragmentById(R.id.fragment_placeholder) instanceof AboutFragment)
return true;
getMenuInflater().inflate(R.menu.activity_option, menu);
if (getCurrentFragment() instanceof ExtensionBrowser) {
menu.findItem(R.id.ml_menu_last_playlist).setVisible(false);
menu.findItem(R.id.ml_menu_sortby).setVisible(false);
}
if (getCurrentFragment() instanceof Filterable) {
MenuItem searchItem = menu.findItem(R.id.ml_menu_filter);
mSearchView = (SearchView) MenuItemCompat.getActionView(searchItem);
mSearchView.setQueryHint(getString(R.string.search_list_hint));
mSearchView.setOnQueryTextListener(this);
MenuItemCompat.setOnActionExpandListener(searchItem, this);
} else
menu.findItem(R.id.ml_menu_filter).setVisible(false);
menu.findItem(R.id.ml_menu_renderers).setVisible(showRenderers);
menu.findItem(R.id.ml_menu_renderers).setIcon(RendererDelegate.INSTANCE.getSelectedRenderer() == null ? R.drawable.ic_am_renderer_normal_w : R.drawable.ic_am_renderer_on_w);
return super.onCreateOptionsMenu(menu);
}
use of org.videolan.vlc.interfaces.Filterable in project vlc-android by videolan.
the class ContentActivity method setSearchVisibility.
private void setSearchVisibility(boolean visible) {
final Fragment current = getCurrentFragment();
if (current instanceof Filterable) {
((Filterable) current).setSearchVisibility(visible);
makeRoomForSearch(current, visible);
}
}
use of org.videolan.vlc.interfaces.Filterable in project vlc-android by GeoffreyMetais.
the class ContentActivity method setSearchVisibility.
private void setSearchVisibility(boolean visible) {
final Fragment current = getCurrentFragment();
if (current instanceof Filterable) {
((Filterable) current).setSearchVisibility(visible);
makeRoomForSearch(current, visible);
}
}
use of org.videolan.vlc.interfaces.Filterable in project vlc-android by GeoffreyMetais.
the class ContentActivity method onCreateOptionsMenu.
@Override
public boolean onCreateOptionsMenu(Menu menu) {
if (getSupportFragmentManager().findFragmentById(R.id.fragment_placeholder) instanceof AboutFragment)
return true;
getMenuInflater().inflate(R.menu.activity_option, menu);
if (getCurrentFragment() instanceof ExtensionBrowser) {
menu.findItem(R.id.ml_menu_last_playlist).setVisible(false);
menu.findItem(R.id.ml_menu_sortby).setVisible(false);
}
if (getCurrentFragment() instanceof Filterable) {
final MenuItem searchItem = menu.findItem(R.id.ml_menu_filter);
mSearchView = (SearchView) searchItem.getActionView();
mSearchView.setQueryHint(getString(R.string.search_list_hint));
mSearchView.setOnQueryTextListener(this);
searchItem.setOnActionExpandListener(this);
} else
menu.findItem(R.id.ml_menu_filter).setVisible(false);
menu.findItem(R.id.ml_menu_renderers).setVisible(showRenderers);
menu.findItem(R.id.ml_menu_renderers).setIcon(!RendererDelegate.INSTANCE.hasRenderer() ? R.drawable.ic_am_renderer_normal_w : R.drawable.ic_am_renderer_on_w);
return super.onCreateOptionsMenu(menu);
}
Aggregations