aboutsummaryrefslogtreecommitdiff
path: root/core/src/main/kotlin/ca/allanwang/kau/utils/BundleUtils.kt
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2018-12-24 20:14:48 -0500
committerAllan Wang <me@allanwang.ca>2018-12-24 20:14:48 -0500
commit84174b8f5bdb0107bee48e0b2b8613a9015eb36e (patch)
tree7b0b1567110339aa501d701e0b7b39520bc98f0f /core/src/main/kotlin/ca/allanwang/kau/utils/BundleUtils.kt
parent8447b1ae8ce89b3f1bbe79dbae8847d901831c12 (diff)
downloadkau-84174b8f5bdb0107bee48e0b2b8613a9015eb36e.tar.gz
kau-84174b8f5bdb0107bee48e0b2b8613a9015eb36e.tar.bz2
kau-84174b8f5bdb0107bee48e0b2b8613a9015eb36e.zip
Add out to scene transition with view, resolves #149
Diffstat (limited to 'core/src/main/kotlin/ca/allanwang/kau/utils/BundleUtils.kt')
-rw-r--r--core/src/main/kotlin/ca/allanwang/kau/utils/BundleUtils.kt4
1 files changed, 3 insertions, 1 deletions
diff --git a/core/src/main/kotlin/ca/allanwang/kau/utils/BundleUtils.kt b/core/src/main/kotlin/ca/allanwang/kau/utils/BundleUtils.kt
index 5b4b188..8dcd856 100644
--- a/core/src/main/kotlin/ca/allanwang/kau/utils/BundleUtils.kt
+++ b/core/src/main/kotlin/ca/allanwang/kau/utils/BundleUtils.kt
@@ -23,6 +23,8 @@ import android.os.Bundle
import android.os.Parcelable
import android.util.Pair
import android.view.View
+import android.widget.ImageView
+import android.widget.TextView
import androidx.annotation.AnimRes
import ca.allanwang.kau.R
import java.io.Serializable
@@ -112,7 +114,7 @@ fun Bundle.withSceneTransitionAnimation(parent: View, data: Map<Int, String>) =
* create a scene transition animation
*/
@SuppressLint("NewApi")
-fun Bundle.withSceneTransitionAnimation(context: Context, data: Map<View, String>) {
+fun Bundle.withSceneTransitionAnimation(context: Context, data: Map<out View, String>) {
if (context !is Activity || !buildIsLollipopAndUp) return
val options = ActivityOptions.makeSceneTransitionAnimation(
context,