Skip to content

Commit edf2932

Browse files
MBL-2626 Onboarding UI polish (#2386)
Onboarding polish Co-authored-by: Isabel Martin <arkariang@gmail.com>
1 parent 25a13b7 commit edf2932

File tree

6 files changed

+13
-4
lines changed

6 files changed

+13
-4
lines changed

app/src/main/java/com/kickstarter/ui/activities/compose/OnboardingFlowScreen.kt

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import androidx.activity.compose.rememberLauncherForActivityResult
33
import androidx.activity.result.ActivityResultLauncher
44
import androidx.activity.result.contract.ActivityResultContracts
55
import androidx.compose.animation.AnimatedContent
6+
import androidx.compose.animation.core.animateFloatAsState
67
import androidx.compose.animation.core.tween
78
import androidx.compose.animation.fadeIn
89
import androidx.compose.animation.fadeOut
@@ -198,14 +199,18 @@ fun OnboardingScreen(
198199
) {
199200

200201
// Progress bar
202+
val animatedProgress by animateFloatAsState(
203+
targetValue = (currentPage + 1) / pages.size.toFloat(),
204+
animationSpec = tween(durationMillis = 1000)
205+
)
201206
Row(
202207
verticalAlignment = Alignment.CenterVertically,
203208
modifier = Modifier
204209
.padding(horizontal = dimensions.paddingLarge)
205210
.padding(top = dimensions.paddingDoubleLarge, bottom = dimensions.paddingLarge)
206211
) {
207212
LinearProgressIndicator(
208-
progress = (currentPage + 1) / pages.size.toFloat(),
213+
progress = animatedProgress,
209214
color = colors.textAccentGreen,
210215
backgroundColor = colors.kds_white,
211216
strokeCap = StrokeCap.Round,
@@ -223,7 +228,7 @@ fun OnboardingScreen(
223228
)
224229
}
225230

226-
// Animated content spans the page
231+
// Animated content spans the page vertically
227232
OnboardingPageAnimation(modifier = Modifier.weight(1.0f), pageData = pages[currentPage])
228233

229234
// Buttons footer
@@ -329,7 +334,7 @@ fun OnboardingPageAnimation(modifier: Modifier, pageData: OnboardingPageData) {
329334

330335
Text(
331336
text = targetPage.description,
332-
style = typographyV2.bodyMD,
337+
style = typographyV2.bodyLG,
333338
color = colors.textPrimary,
334339
textAlign = TextAlign.Center,
335340
minLines = 4,

app/src/main/res/raw-de/android_onboarding_flow_activity_tracking.json

Lines changed: 1 addition & 0 deletions
Large diffs are not rendered by default.

app/src/main/res/raw-es/android_onboarding_flow_activity_tracking.json

Lines changed: 1 addition & 0 deletions
Large diffs are not rendered by default.

app/src/main/res/raw-fr/android_onboarding_flow_activity_tracking.json

Lines changed: 1 addition & 0 deletions
Large diffs are not rendered by default.

app/src/main/res/raw-ja/android_onboarding_flow_activity_tracking.json

Lines changed: 1 addition & 0 deletions
Large diffs are not rendered by default.

app/src/main/res/raw/android_onboarding_flow_activity_tracking.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)