如何在android中创建像QuickPic应用程序这样的裁剪工具?

如何在android中创建像QuickPic应用程序这样的裁剪工具?,android,android-canvas,android-imageview,crop,pinchzoom,Android,Android Canvas,Android Imageview,Crop,Pinchzoom,如何在android中创建裁剪工具,比如我们可以移动和缩放要裁剪的图像的应用程序 我们需要能够移动图像以及裁剪帧。我们需要使用canvas来实现这一点吗 或者我们可以移动另一个物体?任何关于如何开始的建议或链接都将受到表扬 我使用了library,但没有达到我想要的效果。您可以使用相机意图裁剪操作。如果用户设备不支持裁剪意图,他们将看到错误消息。在“try”块中,按如下方式启动意图: //call the standard crop action intent (the user

如何在android中创建裁剪工具,比如我们可以移动和缩放要裁剪的图像的应用程序

我们需要能够移动图像以及裁剪帧。我们需要使用canvas来实现这一点吗

或者我们可以移动另一个物体?任何关于如何开始的建议或链接都将受到表扬


我使用了library,但没有达到我想要的效果。

您可以使用相机意图裁剪操作。如果用户设备不支持裁剪意图,他们将看到错误消息。在“try”块中,按如下方式启动意图:

        //call the standard crop action intent (the user device may not support it)
Intent cropIntent = new Intent("com.android.camera.action.CROP"); 
    //indicate image type and Uri
cropIntent.setDataAndType(picUri, "image/*");
    //set crop properties
cropIntent.putExtra("crop", "true");
    //indicate aspect of desired crop
cropIntent.putExtra("aspectX", 1);
cropIntent.putExtra("aspectY", 1);
    //indicate output X and Y
cropIntent.putExtra("outputX", 256);
cropIntent.putExtra("outputY", 256);
    //retrieve data on return
cropIntent.putExtra("return-data", true);
    //start the activity - we handle returning in onActivityResult
startActivityForResult(cropIntent, PIC_CROP);