我想裁剪图像,我能够实现这一点。
我的代码是
Intent cropIntent = new Intent(Intent.ACTION_PICK,
android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);
cropIntent.setDataAndType(fileUri, "image/*");
// set crop properties
cropIntent.putExtra("crop", "true");
cropIntent.putExtra("return-data", true);
startActivityForResult(cropIntent, CROP_PIC);
其中fileUri
包含我要从图库中裁剪的图像路径的 URI。
使用此代码会打开一个警报以选择应用程序以选择图像,我想知道虽然我已经通过了图像路径,但为什么它要求选择应用程序以打开图像,当我选择应用程序(通过图库)时,我必须从图库中选择图像作物。
我想要一个解决方案,使用该解决方案可以使用裁剪选项打开我的图像,而不要求选择要打开的应用程序?
可能吗?请帮助我实现它...