animateLongAsState 구현

개배박발불지은만자·2024년 12월 24일
0
  val animateLong = animateValueAsState(
    targetValue = promotiondate,
    finishedListener = {
    },
    typeConverter = TwoWayConverter(
      // Long -> AnimationVector1D 변환
      convertToVector = { AnimationVector1D(it.toFloat()) },
      // AnimationVector1D -> Long 변환
      convertFromVector = { it.value.toLong() }
    ),
    animationSpec = tween(durationMillis = 1000)
  )

0개의 댓글