From 8c259e6acc283e50348a8f8825504eed482bf610 Mon Sep 17 00:00:00 2001 From: Allan Wang Date: Mon, 1 Jul 2019 13:46:10 -0700 Subject: Merge scene transition definitions, resolves #213 --- core/src/main/kotlin/ca/allanwang/kau/utils/BundleUtils.kt | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'core/src') 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 @@ -88,16 +88,6 @@ fun bundleOf(vararg params: kotlin.Pair): Bundle { return b } -/** - * 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) = * create a scene transition animation */ @SuppressLint("NewApi") -fun Bundle.withSceneTransitionAnimation(context: Context, data: Map) { +fun Bundle.withSceneTransitionAnimation(context: Context, data: Map = emptyMap()) { if (context !is Activity || !buildIsLollipopAndUp) return val options = ActivityOptions.makeSceneTransitionAnimation( context, -- cgit v1.2.3