diff --git a/.travis.yml b/.travis.yml index 7f1a113..efe0251 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,7 @@ language: android android: components: - - build-tools-21.1.1 + - build-tools-21.1.2 - android-21 - extra-android-support - sys-img-armeabi-v7a-android-21 diff --git a/lib/build.gradle b/lib/build.gradle index d219d0b..a82481c 100644 --- a/lib/build.gradle +++ b/lib/build.gradle @@ -7,7 +7,7 @@ archivesBaseName = 'android-crop' android { compileSdkVersion 21 - buildToolsVersion '21.1.1' + buildToolsVersion '21.1.2' defaultConfig { minSdkVersion 14 @@ -20,8 +20,9 @@ android { dependencies { compile 'com.android.support:support-annotations:21.0.0' + provided 'com.android.support:support-v4:21.0.3' androidTestCompile 'com.squareup:fest-android:1.0.7' - androidTestCompile 'com.android.support:support-v4:21.0.0' + androidTestCompile 'com.android.support:support-v4:21.0.3' androidTestCompile 'org.mockito:mockito-core:1.9.5' androidTestCompile 'com.google.dexmaker:dexmaker:1.0' androidTestCompile 'com.google.dexmaker:dexmaker-mockito:1.0' diff --git a/lib/src/main/java/com/soundcloud/android/crop/Crop.java b/lib/src/main/java/com/soundcloud/android/crop/Crop.java index 52d8601..2ad7fa9 100644 --- a/lib/src/main/java/com/soundcloud/android/crop/Crop.java +++ b/lib/src/main/java/com/soundcloud/android/crop/Crop.java @@ -113,6 +113,16 @@ public class Crop { start(context, fragment, REQUEST_CROP); } + /** + * Send the crop Intent! + * + * @param context Context + * @param fragment Fragment to receive result + */ + public void start(Context context, android.support.v4.app.Fragment fragment) { + start(context, fragment, REQUEST_CROP); + } + /** * Send the crop Intent with a custom requestCode * @@ -125,6 +135,17 @@ public class Crop { fragment.startActivityForResult(getIntent(context), requestCode); } + /** + * Send the crop Intent with a custom requestCode + * + * @param context Context + * @param fragment Fragment to receive result + * @param requestCode requestCode for result + */ + public void start(Context context, android.support.v4.app.Fragment fragment, int requestCode) { + fragment.startActivityForResult(getIntent(context), requestCode); + } + /** * Get Intent to start crop Activity *