aboutsummaryrefslogtreecommitdiff
path: root/core/src
diff options
context:
space:
mode:
Diffstat (limited to 'core/src')
-rw-r--r--core/src/main/kotlin/ca/allanwang/kau/utils/BundleUtils.kt12
1 files changed, 1 insertions, 11 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 40c1c72..b857eb0 100644
--- a/core/src/main/kotlin/ca/allanwang/kau/utils/BundleUtils.kt
+++ b/core/src/main/kotlin/ca/allanwang/kau/utils/BundleUtils.kt
@@ -89,16 +89,6 @@ fun bundleOf(vararg params: kotlin.Pair<String, Any?>): Bundle {
}
/**
- * Adds transition bundle if context is activity and build is lollipop+
- */
-@SuppressLint("NewApi")
-fun Bundle.withSceneTransitionAnimation(context: Context) {
- if (context !is Activity || !buildIsLollipopAndUp) return
- val options = ActivityOptions.makeSceneTransitionAnimation(context)
- putAll(options.toBundle())
-}
-
-/**
* Given the parent view and map of view ids to tags,
* create a scene transition animation
*/
@@ -112,7 +102,7 @@ fun Bundle.withSceneTransitionAnimation(parent: View, data: Map<Int, String>) =
* create a scene transition animation
*/
@SuppressLint("NewApi")
-fun Bundle.withSceneTransitionAnimation(context: Context, data: Map<out View, String>) {
+fun Bundle.withSceneTransitionAnimation(context: Context, data: Map<out View, String> = emptyMap()) {
if (context !is Activity || !buildIsLollipopAndUp) return
val options = ActivityOptions.makeSceneTransitionAnimation(
context,