Let user crop image

前端 未结 4 732
慢半拍i
慢半拍i 2020-12-05 16:27

I am having a hard time in figuring out how to let the user crop the picture. I would like to give bitmap variable with loaded bitmap to crop the picture before setting it a

4条回答
  •  温柔的废话
    2020-12-05 17:11

    As mentioned in similar threads, Android does not have an official crop intent (https://commonsware.com/blog/2013/01/23/no-android-does-not-have-crop-intent.html), so I would stay away from using "com.android.camera.action.CROP".

    However, in the time since this question was originally posted, Android has added a new API in Kitkat (level 19) that allows users to summon a crop-this-image-and-set-as-wallpaper Activity. See WallpaperManager.getCropAndSetWallpaperIntent(), and this might address your original question.

提交回复
热议问题