bhu*_*ups 11
你可以用适当的uri和mimetype为它创建一个Intent.
Intent i = new Intent(Intent.ACTION_VIEW);
i.setDataAndType(Uri.parse("file:///sdcard/image.jpg"), "image/jpeg");
startActivity(i);
Run Code Online (Sandbox Code Playgroud)
小智 5
Intent photoPickerIntent = new Intent(Intent.ACTION_PICK);
photoPickerIntent.setType("image/*");
startActivityForResult(photoPickerIntent, 1);
Run Code Online (Sandbox Code Playgroud)
此代码用于显示SD卡中的所有图像