From fb9ca21757068c0fb4123a5e30b1471ae4c32cf3 Mon Sep 17 00:00:00 2001 From: Allan Wang Date: Sun, 10 Dec 2017 23:39:57 -0500 Subject: Unify start activity design (#112) --- .../main/kotlin/ca/allanwang/kau/mediapicker/MediaPickerBinder.kt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'mediapicker/src/main/kotlin/ca/allanwang') 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 cb218fc..bf58a30 100644 --- a/mediapicker/src/main/kotlin/ca/allanwang/kau/mediapicker/MediaPickerBinder.kt +++ b/mediapicker/src/main/kotlin/ca/allanwang/kau/mediapicker/MediaPickerBinder.kt @@ -4,6 +4,7 @@ import android.app.Activity import android.content.Context import android.content.Intent import ca.allanwang.kau.utils.startActivityForResult +import ca.allanwang.kau.utils.withSceneTransitionAnimation import com.bumptech.glide.RequestBuilder import com.bumptech.glide.load.engine.DiskCacheStrategy import com.bumptech.glide.request.RequestOptions @@ -19,7 +20,10 @@ import com.bumptech.glide.request.RequestOptions * Image picker launchers */ fun Activity.kauLaunchMediaPicker(clazz: Class>, requestCode: Int) { - startActivityForResult(clazz, requestCode, transition = MediaPickerActivityOverlayBase::class.java.isAssignableFrom(clazz)) + startActivityForResult(clazz, requestCode, bundleBuilder = { + if (MediaPickerActivityOverlayBase::class.java.isAssignableFrom(clazz)) + withSceneTransitionAnimation(this@kauLaunchMediaPicker) + }) } /** -- cgit v1.2.3