Merge pull request #86 from nostra13/master

Support Fragments from support-v4
This commit is contained in:
Jamie McDonald 2015-04-17 15:01:51 -04:00
commit bbe009289e
3 changed files with 25 additions and 3 deletions

View File

@ -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

View File

@ -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'

View File

@ -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
*