美文网首页
UCrop的使用随笔

UCrop的使用随笔

作者: 大象屁股 | 来源:发表于2017-06-03 15:13 被阅读77次

UCrop地址 https://github.com/Yalantis/uCrop


  UCrop.of(Uri.parse("file://"+response.getAbsolutePath()), Uri.parse(new WeplayPathManager().getSaveCropImageUrl()))
                        .withAspectRatio(4, 4)
                        .withMaxResultSize(600, 600)
                        .start(activity);
打印后的参数一:
file:///storage/emulated/0/Android/data/com.tooopen.weplay/cache/image/20170603071051.jpg
打印后的参数二:
/storage/emulated/0/Android/data/com.tooopen.weplay/cache/image/201706030711312.jpg

 UCrop.of("","")...
第一参数是Uri,使用的时候需要加上 file://
第二个参数也是uri,不过却不需要加上 file://
具体没时间看源码,先记录
UCrop使用时,只能使用本地图片,所以如果剪切网络图片,需先下载
UCrop的第一个参数需要加上  File://

相关文章

网友评论

      本文标题:UCrop的使用随笔

      本文链接:https://www.haomeiwen.com/subject/vyfmfxtx.html