Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions library/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apply plugin: 'com.android.library'
apply plugin: 'com.github.dcendents.android-maven'
apply plugin: 'com.jfrog.bintray'

version = "3.0.0"
version = "3.0.1"
android {
compileSdkVersion 20
buildToolsVersion "20.0.0"
Expand All @@ -12,7 +12,7 @@ android {
defaultConfig {
minSdkVersion 8
targetSdkVersion 20
versionCode 15
versionCode 16
versionName version
}
buildTypes {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,14 +127,18 @@ private static void onPhotoCropped(CropHandler handler, CropParams cropParams) {
// None-Crop Intents

public static Intent buildGalleryIntent(CropParams params) {
Intent intent;
if (params.enable) {
Intent intent;
/*if (params.enable) {
intent = buildCropIntent(Intent.ACTION_GET_CONTENT, params);
} else {
intent = new Intent(Intent.ACTION_GET_CONTENT)
.setType("image/*")
.setType("image*//*")
.putExtra(MediaStore.EXTRA_OUTPUT, params.uri);
}
}*/

intent = new Intent(Intent.ACTION_GET_CONTENT)
.setType("image/*")
.putExtra(MediaStore.EXTRA_OUTPUT, params.uri);
return intent;
}

Expand All @@ -161,8 +165,7 @@ private static Intent buildCropIntent(String action, CropParams params) {
.putExtra("return-data", params.returnData)
.putExtra("outputFormat", params.outputFormat)
.putExtra("noFaceDetection", params.noFaceDetection)
.putExtra("scaleUpIfNeeded", params.scaleUpIfNeeded)
.putExtra(MediaStore.EXTRA_OUTPUT, params.uri);
.putExtra("scaleUpIfNeeded", params.scaleUpIfNeeded);
}

// Clear Cache
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,12 @@ public CropParams(Context context) {
refreshUri();
}

public CropParams(Context context, boolean cropEnabled, boolean compressEnabled) {
this(context);
enable = cropEnabled;
compress = compressEnabled;
}

public void refreshUri() {
uri = CropHelper.generateUri();
}
Expand Down