Update: Comment out animation for now (till implementing better logic to handle changing state)

This commit is contained in:
machiav3lli 2022-05-29 03:19:55 +02:00
parent 79fe50ee41
commit 090aef6a47

View File

@ -2,12 +2,6 @@ package com.looker.droidify.ui.compose.components
import androidx.compose.animation.AnimatedContent import androidx.compose.animation.AnimatedContent
import androidx.compose.animation.ExperimentalAnimationApi import androidx.compose.animation.ExperimentalAnimationApi
import androidx.compose.animation.SizeTransform
import androidx.compose.animation.fadeIn
import androidx.compose.animation.fadeOut
import androidx.compose.animation.slideInVertically
import androidx.compose.animation.slideOutVertically
import androidx.compose.animation.with
import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Row import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.Spacer import androidx.compose.foundation.layout.Spacer
@ -38,19 +32,20 @@ fun MainActionButton(
) { ) {
AnimatedContent( AnimatedContent(
targetState = packageState, targetState = packageState,
transitionSpec = { // TODO Fix redrawing changing state
//when (targetState) { /*transitionSpec = {
/*is Cancelable -> { when (targetState) {
slideInVertically { height -> height } + fadeIn() with is Cancelable -> {
slideOutVertically { height -> -height } + fadeOut() slideInVertically { height -> height } + fadeIn() with
}*/ slideOutVertically { height -> -height } + fadeOut()
//is ButtonWork -> { }
(slideInVertically { height -> -height } + fadeIn() with is ButtonWork -> {
slideOutVertically { height -> height } + fadeOut()) (slideInVertically { height -> -height } + fadeIn() with
//} slideOutVertically { height -> height } + fadeOut())
//} }
}
.using(SizeTransform(clip = false)) .using(SizeTransform(clip = false))
} }*/
) { ) {
Row( Row(
Modifier Modifier