我有选择的图像无论是从画廊或捕捉的相机图像,我想裁剪图像我所得到的,无法裁切的Android
所以,我用下面的代码来调用作物意图,
Intent cropIntent = new Intent("com.android.camera.action.CROP");
//indicate image type and Uri
cropIntent.setDataAndType(imageUri, "image/*");
//set crop properties
cropIntent.putExtra("crop", "true");
//retrieve data on return
cropIntent.putExtra("return-data", true);
try {
startActivityForResult(cropIntent, REQUEST_CODE_FOR_CROP_DONE);
} catch (ActivityNotFoundException actionNotFoundException) {
Log.e(TAG, actionNotFoundException.getMessage(), actionNotFoundException);
Toast.makeText(fragment.getActivity(), fragment.getResources().getString(R.string.crop_not_available), Toast.LENGTH_SHORT).show();
}
我使用的是Nexus 6p设备,似乎只有在这个设备上我面临这个问题。
这给我敬酒消息说,可以在下面50×50
不作物图像可能我知道我缺少什么?
请查看本博客:https://commonsware.com/博客/ 2013/01/23 /无的Android此结果不具备的,作物intent.html –