diff options
author | Allan Wang <me@allanwang.ca> | 2017-12-10 23:39:57 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-10 23:39:57 -0500 |
commit | fb9ca21757068c0fb4123a5e30b1471ae4c32cf3 (patch) | |
tree | 7d5b5bbe749f24d522ebe6a57c1bf73f1590de48 /mediapicker/src/main/kotlin | |
parent | 1269a026da6a4597f7123e310768e3377e8c63e8 (diff) | |
download | kau-fb9ca21757068c0fb4123a5e30b1471ae4c32cf3.tar.gz kau-fb9ca21757068c0fb4123a5e30b1471ae4c32cf3.tar.bz2 kau-fb9ca21757068c0fb4123a5e30b1471ae4c32cf3.zip |
Unify start activity design (#112)
Diffstat (limited to 'mediapicker/src/main/kotlin')
-rw-r--r-- | mediapicker/src/main/kotlin/ca/allanwang/kau/mediapicker/MediaPickerBinder.kt | 6 |
1 files changed, 5 insertions, 1 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 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<out MediaPickerCore<*>>, requestCode: Int) { - startActivityForResult(clazz, requestCode, transition = MediaPickerActivityOverlayBase::class.java.isAssignableFrom(clazz)) + startActivityForResult(clazz, requestCode, bundleBuilder = { + if (MediaPickerActivityOverlayBase::class.java.isAssignableFrom(clazz)) + withSceneTransitionAnimation(this@kauLaunchMediaPicker) + }) } /** |