Replace SharedTransitionScope with SharedTransitionLayout
This commit is contained in:
parent
997f7d29d0
commit
8d7afb486f
@ -1,6 +1,7 @@
|
|||||||
package de.mm20.launcher2.ui.launcher.search.common.grid
|
package de.mm20.launcher2.ui.launcher.search.common.grid
|
||||||
|
|
||||||
import androidx.compose.animation.AnimatedContent
|
import androidx.compose.animation.AnimatedContent
|
||||||
|
import androidx.compose.animation.SharedTransitionLayout
|
||||||
import androidx.compose.animation.SharedTransitionScope
|
import androidx.compose.animation.SharedTransitionScope
|
||||||
import androidx.compose.animation.fadeIn
|
import androidx.compose.animation.fadeIn
|
||||||
import androidx.compose.animation.fadeOut
|
import androidx.compose.animation.fadeOut
|
||||||
@ -30,10 +31,12 @@ fun SearchResultGrid(
|
|||||||
highlightedItem: SavableSearchable? = null,
|
highlightedItem: SavableSearchable? = null,
|
||||||
transitionKey: Any? = items
|
transitionKey: Any? = items
|
||||||
) {
|
) {
|
||||||
SharedTransitionScope {
|
SharedTransitionLayout(
|
||||||
|
modifier = modifier,
|
||||||
|
) {
|
||||||
AnimatedContent(
|
AnimatedContent(
|
||||||
items to transitionKey,
|
items to transitionKey,
|
||||||
modifier = it then modifier
|
modifier = Modifier
|
||||||
.fillMaxWidth()
|
.fillMaxWidth()
|
||||||
.padding(4.dp),
|
.padding(4.dp),
|
||||||
transitionSpec = {
|
transitionSpec = {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user