Android 图片裁剪库 uCrop
- 授权协议: Apache
- 开发语言: Java
- 操作系统: Android
- 软件首页: https://yalantis.com/blog/introducing-ucrop-our-own-image-cropping-library-for-android/
- 软件文档: https://github.com/Yalantis/uCrop/blob/master/README.md
- 官方下载: https://github.com/Yalantis/uCrop/archive/master.zip
软件介绍
uCrop 是[Yalantis](https://yalantis.com/) 组织开源的图片裁剪库, 支持缩放, 旋转图片, 支持各种比例的裁剪框, 非常强大的一个图片裁剪库。
使用
1. 添加包.
compile 'com.yalantis:ucrop:1.3.+'
2. 注册 UCropActivity 在 AndroidManifest.xml中
<activity android:name="com.yalantis.ucrop.UCropActivity" android:screenOrientation="portrait" android:theme="@style/Theme.AppCompat.Light.NoActionBar"/>
3. 代码设置
UCrop.of(sourceUri, destinationUri) .withAspectRatio(16, 9) .withMaxResultSize(maxWidth, maxHeight) .start(context);
4. 实现继承的方法
@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
if (resultCode == RESULT_OK && requestCode == UCrop.REQUEST_CROP) {
final Uri resultUri = UCrop.getOutput(data);
} else if (resultCode == UCrop.RESULT_ERROR) {
final Throwable cropError = UCrop.getError(data);
}
}
Hacking Growth
Sean Ellis、Morgan Brown / Crown Business / 2017-4-25 / USD 29.00
The definitive playbook by the pioneers of Growth Hacking, one of the hottest business methodologies in Silicon Valley and beyond. It seems hard to believe today, but there was a time when Airbnb w......一起来看看 《Hacking Growth》 这本书的介绍吧!

