本文整理汇总了Java中org.videolan.vlc.gui.browser.StorageBrowserFragment类的典型用法代码示例。如果您正苦于以下问题:Java StorageBrowserFragment类的具体用法?Java StorageBrowserFragment怎么用?Java StorageBrowserFragment使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
StorageBrowserFragment类属于org.videolan.vlc.gui.browser包,在下文中一共展示了StorageBrowserFragment类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onOptionsItemSelected
import org.videolan.vlc.gui.browser.StorageBrowserFragment; //导入依赖的package包/类
@Override
public boolean onOptionsItemSelected(MenuItem item) {
// Handle item selection
switch (item.getItemId()) {
case android.R.id.home:
Fragment current = getSupportFragmentManager().findFragmentById(R.id.fragment_placeholder);
if (current instanceof StorageBrowserFragment)
((StorageBrowserFragment) current).goBack();
else
finish();
return true;
case R.id.ml_menu_sortby_name:
case R.id.ml_menu_sortby_length:
((ISortable) mFragment).sortBy(item.getItemId() == R.id.ml_menu_sortby_name
? VideoListAdapter.SORT_BY_TITLE
: VideoListAdapter.SORT_BY_LENGTH);
break;
case R.id.ml_menu_refresh:
if (!MediaLibrary.getInstance().isWorking())
MediaLibrary.getInstance().loadMediaItems(true);
break;
}
return super.onOptionsItemSelected(item);
}
示例2: onOptionsItemSelected
import org.videolan.vlc.gui.browser.StorageBrowserFragment; //导入依赖的package包/类
@Override
public boolean onOptionsItemSelected(MenuItem item) {
// Handle item selection
switch (item.getItemId()) {
case android.R.id.home:
Fragment current = getSupportFragmentManager().findFragmentById(R.id.fragment_placeholder);
if (current instanceof StorageBrowserFragment)
((StorageBrowserFragment) current).goBack();
else
finish();
return true;
case R.id.ml_menu_sortby_name:
case R.id.ml_menu_sortby_length:
((ISortable) mFragment).sortBy(item.getItemId() == R.id.ml_menu_sortby_name
? VideoListAdapter.SORT_BY_TITLE
: VideoListAdapter.SORT_BY_LENGTH);
break;
case R.id.ml_menu_refresh:
if (!MediaLibrary.getInstance().isWorking())
MediaLibrary.getInstance().scanMediaItems(true);
break;
}
return super.onOptionsItemSelected(item);
}