• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
<lambda>null2  * Copyright (C) 2025 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 package com.android.compose.animation.scene
18 
19 import androidx.compose.material3.ExperimentalMaterial3ExpressiveApi
20 import androidx.compose.material3.MotionScheme
21 import com.android.compose.animation.scene.content.state.TransitionState
22 
23 internal fun MutableSceneTransitionLayoutStateForTests(
24     initialScene: SceneKey,
25     transitions: SceneTransitions = SceneTransitions.Empty,
26     initialOverlays: Set<OverlayKey> = emptySet(),
27     canChangeScene: (SceneKey) -> Boolean = { true },
<lambda>null28     canShowOverlay: (OverlayKey) -> Boolean = { true },
<lambda>null29     canHideOverlay: (OverlayKey) -> Boolean = { true },
_null30     canReplaceOverlay: (from: OverlayKey, to: OverlayKey) -> Boolean = { _, _ -> true },
<lambda>null31     onTransitionStart: (TransitionState.Transition) -> Unit = {},
<lambda>null32     onTransitionEnd: (TransitionState.Transition) -> Unit = {},
33 ): MutableSceneTransitionLayoutStateImpl {
34     @OptIn(ExperimentalMaterial3ExpressiveApi::class)
35     return MutableSceneTransitionLayoutStateImpl(
36         initialScene,
37         motionScheme = MotionScheme.standard(),
38         transitions,
39         initialOverlays,
40         canChangeScene,
41         canShowOverlay,
42         canHideOverlay,
43         canReplaceOverlay,
44         onTransitionStart,
45         onTransitionEnd,
46     )
47 }
48