diff --git a/.idea/gradle.xml b/.idea/gradle.xml index 3a1ea64..ea5f322 100644 --- a/.idea/gradle.xml +++ b/.idea/gradle.xml @@ -13,6 +13,7 @@ + diff --git a/app/src/main/java/net/kwmt27/jetpackcomposeplayground/animation/AnimatedContent.kt b/app/src/main/java/net/kwmt27/jetpackcomposeplayground/animation/AnimatedContent.kt index 5f59b31..9b8dfdc 100644 --- a/app/src/main/java/net/kwmt27/jetpackcomposeplayground/animation/AnimatedContent.kt +++ b/app/src/main/java/net/kwmt27/jetpackcomposeplayground/animation/AnimatedContent.kt @@ -3,7 +3,6 @@ package net.kwmt27.jetpackcomposeplayground.animation import androidx.compose.animation.AnimatedContent import androidx.compose.animation.AnimatedVisibility import androidx.compose.animation.Crossfade -import androidx.compose.animation.ExperimentalAnimationApi import androidx.compose.animation.SizeTransform import androidx.compose.animation.core.tween import androidx.compose.animation.fadeIn @@ -11,7 +10,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 @@ -116,7 +115,6 @@ private fun AnimatedContent0(count: Int) { /** * AnimatedContent デフォルトアニメーション */ -@OptIn(ExperimentalAnimationApi::class) @Composable private fun AnimatedContent1(count: Int) { AnimatedContent(targetState = count, label = "AnimatedContent1") { targetCount -> @@ -127,14 +125,13 @@ private fun AnimatedContent1(count: Int) { /** * ローリングアニメーション */ -@OptIn(ExperimentalAnimationApi::class) @Composable 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) ) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index f7eb1dc..7d601a9 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,20 +1,20 @@ [versions] -androidGradlePlugin = "8.3.0-alpha13" +androidGradlePlugin = "8.3.0-alpha16" cameraCore = "1.4.0-alpha02" kotlin = "1.9.10" compose = "1.4.3" composeCompiler = "1.5.3" composeBom = "2023.10.01" -androidxCoreKtx = "1.10.0" -androidxAppcompat = "1.7.0-alpha02" -googleMaterial = "1.8.0" -activityCompose = "1.7.1" -androidxLifecycle = "2.6.1" -coil = "2.4.0" +androidxCoreKtx = "1.12.0" +androidxAppcompat = "1.7.0-alpha03" +googleMaterial = "1.10.0" +activityCompose = "1.8.1" +androidxLifecycle = "2.6.2" +coil = "2.5.0" accompanist = "0.31.3-beta" -androidxNavigation = "2.6.0-beta01" -junit = "1.1.2" -espresso = "3.3.0" +androidxNavigation = "2.7.5" +junit = "1.1.5" +espresso = "3.5.1" constraintlayout = "2.1.4" [libraries] androidx-camera-camera2 = { module = "androidx.camera:camera-camera2", version.ref = "cameraCore" }