aboutsummaryrefslogtreecommitdiff
path: root/mediapicker/src/main/kotlin/ca
diff options
context:
space:
mode:
Diffstat (limited to 'mediapicker/src/main/kotlin/ca')
-rw-r--r--mediapicker/src/main/kotlin/ca/allanwang/kau/mediapicker/MediaPickerBinder.kt6
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)
+ })
}
/**