-----------------------------------------------相机意图---------------------------------------------------
// 调用相册意图
Intent intent = new Intent(Intent.ACTION_PICK);
intent.setType(“image/*”);
// 跳转回传–请求码
startActivityForResult(intent, 1);
// 相机返回值
if (requestCode == 0) {
Bitmap bitmap = data.getParcelableExtra(“data”);
imageView.setImageBitmap(bitmap);
}
--------------------------------------------------相册意图-------------------------------------------------
// 调用相册意图
Intent intent = new Intent(Intent.ACTION_PICK);
intent.setType(“image/*”);
// 跳转回传–请求码
startActivityForResult(intent, 1);
// 相册返回值
if (requestCode == 1) {
Uri uri = data.getData();
imageView.setImageURI(uri);
}