Intent打开某个类型的文件.
@(Android学习)
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
...
Intent intent = new Intent(Intent.ACTION_GET_CONTENT);
//打开某一类型文件,图片可替换为video/*等.查看不同资源.
intent.setType("image/*");
//创建选择器,可以设置选择器标题
Intent wrapperIntent=intent.createChooser(intent, "选择文件");
startActivityForResult(wrapperIntent, 0);
...
}