diff options
Diffstat (limited to 'mediapicker/src/main/kotlin')
-rw-r--r-- | mediapicker/src/main/kotlin/ca/allanwang/kau/mediapicker/MediaPickerBinder.kt | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mediapicker/src/main/kotlin/ca/allanwang/kau/mediapicker/MediaPickerBinder.kt b/mediapicker/src/main/kotlin/ca/allanwang/kau/mediapicker/MediaPickerBinder.kt index bf58a30..87f5a42 100644 --- a/mediapicker/src/main/kotlin/ca/allanwang/kau/mediapicker/MediaPickerBinder.kt +++ b/mediapicker/src/main/kotlin/ca/allanwang/kau/mediapicker/MediaPickerBinder.kt @@ -19,9 +19,9 @@ import com.bumptech.glide.request.RequestOptions /** * Image picker launchers */ -fun Activity.kauLaunchMediaPicker(clazz: Class<out MediaPickerCore<*>>, requestCode: Int) { - startActivityForResult(clazz, requestCode, bundleBuilder = { - if (MediaPickerActivityOverlayBase::class.java.isAssignableFrom(clazz)) +inline fun <reified T : MediaPickerCore<*>> Activity.kauLaunchMediaPicker(requestCode: Int) { + startActivityForResult<T>(requestCode, bundleBuilder = { + if (MediaPickerActivityOverlayBase::class.java.isAssignableFrom(T::class.java)) withSceneTransitionAnimation(this@kauLaunchMediaPicker) }) } |