Skip to content

Commit

Permalink
Update Transition and Ripple
Browse files Browse the repository at this point in the history
  • Loading branch information
JolandaVerhoef committed Sep 5, 2024
1 parent 9c585a5 commit 1e54aad
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ import androidx.compose.animation.core.CubicBezierEasing
import androidx.compose.animation.core.LinearOutSlowInEasing
import androidx.compose.animation.core.MutableTransitionState
import androidx.compose.animation.core.animateFloat
import androidx.compose.animation.core.rememberTransition
import androidx.compose.animation.core.tween
import androidx.compose.animation.core.updateTransition
import androidx.compose.foundation.Canvas
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
Expand Down Expand Up @@ -50,7 +50,7 @@ fun AnimatedCircle(
.apply { targetState = AnimatedCircleProgress.END }
}
val stroke = with(LocalDensity.current) { Stroke(5.dp.toPx()) }
val transition = updateTransition(currentState)
val transition = rememberTransition(currentState)
val angleOffset by transition.animateFloat(
transitionSpec = {
tween(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import androidx.compose.material.Icon
import androidx.compose.material.MaterialTheme
import androidx.compose.material.Surface
import androidx.compose.material.Text
import androidx.compose.material.ripple.rememberRipple
import androidx.compose.material.ripple
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.compose.runtime.remember
Expand Down Expand Up @@ -102,7 +102,7 @@ private fun RallyTab(
onClick = onSelected,
role = Role.Tab,
interactionSource = remember { MutableInteractionSource() },
indication = rememberRipple(
indication = ripple(
bounded = false,
radius = Dp.Unspecified,
color = Color.Unspecified
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ import androidx.compose.animation.core.CubicBezierEasing
import androidx.compose.animation.core.LinearOutSlowInEasing
import androidx.compose.animation.core.MutableTransitionState
import androidx.compose.animation.core.animateFloat
import androidx.compose.animation.core.rememberTransition
import androidx.compose.animation.core.tween
import androidx.compose.animation.core.updateTransition
import androidx.compose.foundation.Canvas
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
Expand Down Expand Up @@ -50,7 +50,7 @@ fun AnimatedCircle(
.apply { targetState = AnimatedCircleProgress.END }
}
val stroke = with(LocalDensity.current) { Stroke(5.dp.toPx()) }
val transition = updateTransition(currentState)
val transition = rememberTransition(currentState)
val angleOffset by transition.animateFloat(
transitionSpec = {
tween(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import androidx.compose.material.Icon
import androidx.compose.material.MaterialTheme
import androidx.compose.material.Surface
import androidx.compose.material.Text
import androidx.compose.material.ripple.rememberRipple
import androidx.compose.material.ripple
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.compose.runtime.remember
Expand Down Expand Up @@ -102,7 +102,7 @@ private fun RallyTab(
onClick = onSelected,
role = Role.Tab,
interactionSource = remember { MutableInteractionSource() },
indication = rememberRipple(
indication = ripple(
bounded = false,
radius = Dp.Unspecified,
color = Color.Unspecified
Expand Down

0 comments on commit 1e54aad

Please sign in to comment.