本文整理汇总了Java中group.pals.android.lib.ui.filechooser.FileChooserActivity.ViewType类的典型用法代码示例。如果您正苦于以下问题:Java ViewType类的具体用法?Java ViewType怎么用?Java ViewType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ViewType类属于group.pals.android.lib.ui.filechooser.FileChooserActivity包,在下文中一共展示了ViewType类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getViewType
import group.pals.android.lib.ui.filechooser.FileChooserActivity.ViewType; //导入依赖的package包/类
/**
* Gets view type.
*
* @param c
* {@link Context}
* @return {@link ViewType}
*/
public static ViewType getViewType(Context c) {
return ViewType.LIST.ordinal() == p(c).getInt(
c.getString(R.string.afc_pkey_display_view_type),
c.getResources().getInteger(
R.integer.afc_pkey_display_view_type_def)) ? ViewType.LIST
: ViewType.GRID;
}
示例2: setViewType
import group.pals.android.lib.ui.filechooser.FileChooserActivity.ViewType; //导入依赖的package包/类
/**
* Sets view type.
*
* @param c
* {@link Context}
* @param v
* {@link ViewType}, if {@code null}, default value will be used.
*/
public static void setViewType(Context c, ViewType v) {
String key = c.getString(R.string.afc_pkey_display_view_type);
if (v == null)
p(c).edit()
.putInt(key,
c.getResources().getInteger(
R.integer.afc_pkey_display_view_type_def))
.commit();
else
p(c).edit().putInt(key, v.ordinal()).commit();
}
示例3: switchViewType
import group.pals.android.lib.ui.filechooser.FileChooserActivity.ViewType; //导入依赖的package包/类
/**
* Switch view type between {@link ViewType#LIST} and {@link ViewType#GRID}
*/
private void switchViewType() {
switch (DisplayPrefs.getViewType(getActivity())) {
case GRID:
DisplayPrefs.setViewType(getActivity(), ViewType.LIST);
break;
case LIST:
DisplayPrefs.setViewType(getActivity(), ViewType.GRID);
break;
}
setupViewFiles();
getActivity().supportInvalidateOptionsMenu();
goTo(getCurrentLocation());
}
示例4: getViewType
import group.pals.android.lib.ui.filechooser.FileChooserActivity.ViewType; //导入依赖的package包/类
/**
* Gets view type.
*
* @param c
* {@link Context}
* @return {@link ViewType}
*/
public static ViewType getViewType(Context c) {
return ViewType.List.ordinal() == p(c).getInt(
c.getString(R.string.afc_pkey_display_view_type),
c.getResources().getInteger(
R.integer.afc_pkey_display_view_type_def)) ? ViewType.List
: ViewType.Grid;
}
示例5: setViewType
import group.pals.android.lib.ui.filechooser.FileChooserActivity.ViewType; //导入依赖的package包/类
/**
* Sets view type.
*
* @param c
* {@link Context}
* @param v
* {@link ViewType}, if {@code null}, default value will be used.
*/
public static void setViewType(Context c, ViewType v) {
String key = c.getString(R.string.afc_pkey_display_view_type);
if (v == null)
p(c).edit().putInt(key, c.getResources().getInteger(R.integer.afc_pkey_display_view_type_def)).commit();
else
p(c).edit().putInt(key, v.ordinal()).commit();
}
示例6: getViewType
import group.pals.android.lib.ui.filechooser.FileChooserActivity.ViewType; //导入依赖的package包/类
/**
* Gets view type.
*
* @param c
* {@link Context}
* @return {@link ViewType}
*/
public static ViewType getViewType(Context c) {
return ViewType.List.ordinal() == p(c).getInt(c.getString(R.string.afc_pkey_display_view_type),
c.getResources().getInteger(R.integer.afc_pkey_display_view_type_def)) ? ViewType.List : ViewType.Grid;
}