You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
android:theme="@style/Base.Theme.AppCompat"/><!-- optional (needed if default theme has no action bar) -->
28
28
```
29
29
30
30
3. Start `CropImageActivity` using builder pattern from your activity
31
31
```java
32
32
CropImage.activity(imageUri)
33
33
.setGuidelines(CropImageView.Guidelines.ON)
34
34
.start(this);
35
+
36
+
// for fragment (DO NOT use `getActivity()`)
37
+
CropImage.activity(imageUri)
38
+
.start(getContext(), this);
35
39
```
36
40
37
41
4. Override `onActivityResult` method in your activity to get crop result
@@ -71,7 +75,7 @@ Include the library
71
75
4. Get cropped image
72
76
```java
73
77
Bitmap cropped = cropImageView.getCroppedImage();
74
-
// or (must subscribe to async event using cropImageView.setOnGetCroppedImageCompleteListener(listener))
78
+
// or (must subscribe to async event using cropImageView.setOnCropImageCompleteListener(listener))
75
79
cropImageView.getCroppedImageAsync();
76
80
```
77
81
@@ -83,7 +87,8 @@ Include the library
83
87
- Auto rotate bitmap by image Exif data.
84
88
- Set result image min/max limits in pixels.
85
89
- Set initial crop window size/location.
86
-
- Bitmap memory optimization.
90
+
- Request cropped image resize to specific size.
91
+
- Bitmap memory optimization, OOM handling (should never occur)!
87
92
- API Level 10.
88
93
- More..
89
94
@@ -104,7 +109,17 @@ For more information, see the [GitHub Wiki](https://github.com/ArthurHub/Android
104
109
## Change log
105
110
*2.3.0*
106
111
107
-
112
+
- Change required width/height behavior to support resizing (inside/fit/exact) see wiki for details.
113
+
- Add sampling fallback to lower cropped image resolution on OOM error (if image loaded from URI).
114
+
- Setting aspect ratio will also set it to fixed, to help with confusion, add clear aspect ratio method.
115
+
- Add support for setting min/max crop result size in code on CropImageView.
116
+
- Fix cropping failing bug when skia fails region cropping.
117
+
- Add Fallback to Intent.ACTION_PICK if no intent found for Intent.ACTION_GET_CONTENT (thx geolyth)
118
+
- Multi touch support for cropping window (experimental, thx bbwharris)
119
+
-**BREAKING CHANGES**:
120
+
- If you previously used requested width/height the default behavior now is to resize inside the cropped image, to preserve the previous behavior you need to pass the SAMPLING option.
121
+
-`OnGetCroppedImageCompleteListener` and `OnSaveCroppedImageCompleteListener` is deprecated, use `OnCropImageCompleteListener` that combines the two and provides the result object as crop activity.
122
+
- Set aspect ratio also sets fixed aspect ratio to true, if this is not the desired behavior set the fix aspect ratio flag manually or call the method after calling set aspect ratio.
0 commit comments