本文整理汇总了Java中com.lamerman.SelectionMode类的典型用法代码示例。如果您正苦于以下问题:Java SelectionMode类的具体用法?Java SelectionMode怎么用?Java SelectionMode使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
SelectionMode类属于com.lamerman包,在下文中一共展示了SelectionMode类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onFileBrowserButton
import com.lamerman.SelectionMode; //导入依赖的package包/类
public void onFileBrowserButton(View v) {
Intent intent = new Intent(getBaseContext(), FileDialog.class);
intent.putExtra(FileDialog.START_PATH, Environment
.getExternalStorageDirectory().toString());
// can user select directories or not
intent.putExtra(FileDialog.CAN_SELECT_DIR, false);
// alternatively you can set file filter
intent.putExtra(FileDialog.FORMAT_FILTER, new String[] { "zip", "gpx", "ZIP", "GPX" });
intent.putExtra(FileDialog.SELECTION_MODE, SelectionMode.MODE_OPEN);
startInternalActivityForResult(intent, REQUEST_BROWSE);
}
示例2: chooserDir
import com.lamerman.SelectionMode; //导入依赖的package包/类
private void chooserDir() {
Intent intent = new Intent(getActivity(), FileDialog.class);
intent.putExtra(FileDialog.START_PATH, Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES).getAbsolutePath());
// can user select directories or not
intent.putExtra(FileDialog.CAN_SELECT_DIR, true);
intent.putExtra(FileDialog.SELECTION_MODE, SelectionMode.MODE_CREATE);
// alternatively you can set file filter
// intent.putExtra(FileDialog.FORMAT_FILTER, new String[] { "png" });
startActivityForResult(intent, REQUEST_CODE);
}
示例3: onCreate
import com.lamerman.SelectionMode; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Intent intent = new Intent(getBaseContext(), FileDialog.class);
intent.putExtra(FileDialog.START_PATH, "/sdcard");
intent.putExtra(FileDialog.CAN_SELECT_DIR, true);
intent.putExtra(FileDialog.SELECTION_MODE, SelectionMode.MODE_CREATE);
startActivityForResult(intent, 0);
}
示例4: onCreate
import com.lamerman.SelectionMode; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Intent intent = new Intent(getBaseContext(), FileDialog.class);
intent.putExtra(FileDialog.START_PATH, Environment.getExternalStorageDirectory().getPath());
intent.putExtra(FileDialog.CAN_SELECT_DIR, false);
//intent.putExtra(FileDialog.FORMAT_FILTER, new String[] { "_rsa" });
intent.putExtra(FileDialog.SELECTION_MODE, SelectionMode.MODE_OPEN);
startActivityForResult(intent, 0);
}