Skip to content

Commit

Permalink
withがdeprecatedになっていたのでtogetherWithに変更
Browse files Browse the repository at this point in the history
kwmt committed Dec 3, 2023
1 parent 43d6df6 commit 7fa5cc0
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -11,7 +11,7 @@ import androidx.compose.animation.fadeOut
import androidx.compose.animation.shrinkHorizontally
import androidx.compose.animation.slideInVertically
import androidx.compose.animation.slideOutVertically
import androidx.compose.animation.with
import androidx.compose.animation.togetherWith
import androidx.compose.foundation.background
import androidx.compose.foundation.clickable
import androidx.compose.foundation.interaction.MutableInteractionSource
@@ -132,9 +132,9 @@ private fun AnimatedContent1(count: Int) {
private fun AnimatedContent2(count: Int) {
AnimatedContent(targetState = count, label = "AnimatedContent2", transitionSpec = {
if (targetState > initialState) {
slideInVertically { height -> height } + fadeIn() with slideOutVertically { height -> -height } + fadeOut()
slideInVertically { height -> height } + fadeIn() togetherWith slideOutVertically { height -> -height } + fadeOut()
} else {
slideInVertically { height -> -height } + fadeIn() with slideOutVertically { height -> height } + fadeOut()
slideInVertically { height -> -height } + fadeIn() togetherWith slideOutVertically { height -> height } + fadeOut()
}.using(
SizeTransform(clip = false)
)

0 comments on commit 7fa5cc0

Please sign in to comment.