aboutsummaryrefslogtreecommitdiff
path: root/mediapicker/src/main/kotlin/ca
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2017-12-10 23:39:57 -0500
committerGitHub <noreply@github.com>2017-12-10 23:39:57 -0500
commitfb9ca21757068c0fb4123a5e30b1471ae4c32cf3 (patch)
tree7d5b5bbe749f24d522ebe6a57c1bf73f1590de48 /mediapicker/src/main/kotlin/ca
parent1269a026da6a4597f7123e310768e3377e8c63e8 (diff)
downloadkau-fb9ca21757068c0fb4123a5e30b1471ae4c32cf3.tar.gz
kau-fb9ca21757068c0fb4123a5e30b1471ae4c32cf3.tar.bz2
kau-fb9ca21757068c0fb4123a5e30b1471ae4c32cf3.zip
Unify start activity design (#112)
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)
+ })
}
/**