diff --git a/feature/management-event/src/main/java/com/wap/wapp/feature/management/event/edit/EventEditScreen.kt b/feature/management-event/src/main/java/com/wap/wapp/feature/management/event/edit/EventEditScreen.kt index 93a59fe8..ec1a0e55 100644 --- a/feature/management-event/src/main/java/com/wap/wapp/feature/management/event/edit/EventEditScreen.kt +++ b/feature/management-event/src/main/java/com/wap/wapp/feature/management/event/edit/EventEditScreen.kt @@ -1,5 +1,8 @@ package com.wap.wapp.feature.management.event.edit +import androidx.compose.animation.core.Spring +import androidx.compose.animation.core.animateFloatAsState +import androidx.compose.animation.core.spring import androidx.compose.foundation.background import androidx.compose.foundation.border import androidx.compose.foundation.layout.Arrangement @@ -260,13 +263,21 @@ private fun EventEditStateText( private fun EventEditStateProgressBar( currentRegistrationProgress: Float, ) { + val progress by animateFloatAsState( + targetValue = currentRegistrationProgress, + animationSpec = spring( + stiffness = Spring.StiffnessMediumLow, + dampingRatio = Spring.DampingRatioMediumBouncy, + ), + ) + LinearProgressIndicator( modifier = Modifier .fillMaxWidth() .height(10.dp), color = WappTheme.colors.yellow34, trackColor = WappTheme.colors.white, - progress = currentRegistrationProgress, + progress = progress, strokeCap = StrokeCap.Round, ) } diff --git a/feature/management-event/src/main/java/com/wap/wapp/feature/management/event/registration/EventRegistrationScreen.kt b/feature/management-event/src/main/java/com/wap/wapp/feature/management/event/registration/EventRegistrationScreen.kt index 48bd84d1..973942e8 100644 --- a/feature/management-event/src/main/java/com/wap/wapp/feature/management/event/registration/EventRegistrationScreen.kt +++ b/feature/management-event/src/main/java/com/wap/wapp/feature/management/event/registration/EventRegistrationScreen.kt @@ -1,5 +1,8 @@ package com.wap.wapp.feature.management.event.registration +import androidx.compose.animation.core.Spring +import androidx.compose.animation.core.animateFloatAsState +import androidx.compose.animation.core.spring import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.Row @@ -227,13 +230,21 @@ private fun EventRegistrationStateText( private fun EventRegistrationStateProgressBar( currentRegistrationProgress: Float, ) { + val progress by animateFloatAsState( + targetValue = currentRegistrationProgress, + animationSpec = spring( + stiffness = Spring.StiffnessMediumLow, + dampingRatio = Spring.DampingRatioMediumBouncy, + ), + ) + LinearProgressIndicator( modifier = Modifier .fillMaxWidth() .height(10.dp), color = WappTheme.colors.yellow34, trackColor = WappTheme.colors.white, - progress = currentRegistrationProgress, + progress = progress, strokeCap = StrokeCap.Round, ) } diff --git a/feature/management-survey/src/main/java/com/wap/wapp/feature/management/survey/SurveyFormStateIndicator.kt b/feature/management-survey/src/main/java/com/wap/wapp/feature/management/survey/SurveyFormStateIndicator.kt index 48696ba9..1ebd8d6d 100644 --- a/feature/management-survey/src/main/java/com/wap/wapp/feature/management/survey/SurveyFormStateIndicator.kt +++ b/feature/management-survey/src/main/java/com/wap/wapp/feature/management/survey/SurveyFormStateIndicator.kt @@ -1,5 +1,8 @@ package com.wap.wapp.feature.management.survey +import androidx.compose.animation.core.Spring +import androidx.compose.animation.core.animateFloatAsState +import androidx.compose.animation.core.spring import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.Row @@ -8,6 +11,7 @@ import androidx.compose.foundation.layout.height import androidx.compose.material3.LinearProgressIndicator import androidx.compose.material3.Text import androidx.compose.runtime.Composable +import androidx.compose.runtime.getValue import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.StrokeCap @@ -52,13 +56,21 @@ private fun SurveyRegistrationStateText( private fun SurveyRegistrationStateProgressBar( currentRegistrationProgress: Float, ) { + val progress by animateFloatAsState( + targetValue = currentRegistrationProgress, + animationSpec = spring( + stiffness = Spring.StiffnessMediumLow, + dampingRatio = Spring.DampingRatioMediumBouncy, + ), + ) + LinearProgressIndicator( modifier = Modifier .fillMaxWidth() .height(10.dp), color = WappTheme.colors.yellow34, trackColor = WappTheme.colors.white, - progress = currentRegistrationProgress, + progress = progress, strokeCap = StrokeCap.Round, ) }