From f05b734847cc1d53599aca74b968984c06154d37 Mon Sep 17 00:00:00 2001 From: Flavia Handrea Date: Tue, 27 Aug 2024 13:41:09 +0300 Subject: [PATCH] Onboarding design updates for tablet. --- .../compose/ArchiveNamePage.kt | 26 ++-- .../compose/ArchiveOnboardingScreen.kt | 2 - .../compose/ArchiveTypePage.kt | 49 ++++--- .../ui/archiveOnboarding/compose/GoalsPage.kt | 124 +++++++----------- .../compose/PrioritiesPage.kt | 108 ++++++--------- .../ui/composeComponents/CustomCheckbox.kt | 10 +- app/src/main/res/values/strings.xml | 13 +- 7 files changed, 133 insertions(+), 199 deletions(-) diff --git a/app/src/main/java/org/permanent/permanent/ui/archiveOnboarding/compose/ArchiveNamePage.kt b/app/src/main/java/org/permanent/permanent/ui/archiveOnboarding/compose/ArchiveNamePage.kt index 415ca3bf..10f75b0e 100644 --- a/app/src/main/java/org/permanent/permanent/ui/archiveOnboarding/compose/ArchiveNamePage.kt +++ b/app/src/main/java/org/permanent/permanent/ui/archiveOnboarding/compose/ArchiveNamePage.kt @@ -13,7 +13,6 @@ import androidx.compose.foundation.layout.fillMaxHeight import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.height import androidx.compose.foundation.layout.padding -import androidx.compose.foundation.layout.width import androidx.compose.foundation.pager.PagerState import androidx.compose.foundation.shape.RoundedCornerShape import androidx.compose.material3.Text @@ -47,7 +46,6 @@ import org.permanent.permanent.R import org.permanent.permanent.ui.composeComponents.ButtonColor import org.permanent.permanent.ui.composeComponents.ButtonIconAlignment import org.permanent.permanent.ui.composeComponents.SmallTextAndIconButton -import org.permanent.permanent.ui.composeComponents.TextAndIconButton @Composable @@ -200,10 +198,10 @@ private fun TabletBody( horizontalArrangement = Arrangement.spacedBy(32.dp) ) { Box( - modifier = Modifier.width(120.dp) + modifier = Modifier.weight(1f) ) { SmallTextAndIconButton( - ButtonColor.TRANSPARENT, + buttonColor = ButtonColor.TRANSPARENT, text = stringResource(id = R.string.back), icon = painterResource(id = R.drawable.ic_arrow_back_rounded_white), iconAlignment = ButtonIconAlignment.START @@ -214,16 +212,20 @@ private fun TabletBody( } } - TextAndIconButton( - ButtonColor.LIGHT, - text = stringResource(id = R.string.create_the_archive), - showButtonEnabled = textFieldValueState.text.isNotEmpty() + Box( + modifier = Modifier.weight(1f) ) { - if (textFieldValueState.text.isNotEmpty()) { - coroutineScope.launch { - pagerState.animateScrollToPage(OnboardingPage.GOALS.value) + SmallTextAndIconButton( + buttonColor = ButtonColor.LIGHT, + text = stringResource(id = R.string.next), + showButtonEnabled = textFieldValueState.text.isNotEmpty() + ) { + if (textFieldValueState.text.isNotEmpty()) { + coroutineScope.launch { + pagerState.animateScrollToPage(OnboardingPage.GOALS.value) + } + newArchive.name = textFieldValueState.text } - newArchive.name = textFieldValueState.text } } } diff --git a/app/src/main/java/org/permanent/permanent/ui/archiveOnboarding/compose/ArchiveOnboardingScreen.kt b/app/src/main/java/org/permanent/permanent/ui/archiveOnboarding/compose/ArchiveOnboardingScreen.kt index 7e6d1038..1f62ab5f 100644 --- a/app/src/main/java/org/permanent/permanent/ui/archiveOnboarding/compose/ArchiveOnboardingScreen.kt +++ b/app/src/main/java/org/permanent/permanent/ui/archiveOnboarding/compose/ArchiveOnboardingScreen.kt @@ -253,7 +253,6 @@ fun ArchiveOnboardingScreen( GoalsPage( viewModel = viewModel, isTablet = isTablet, - horizontalPaddingDp = horizontalPaddingDp, pagerState = pagerState, newArchive = newArchive, goals = goals @@ -264,7 +263,6 @@ fun ArchiveOnboardingScreen( PrioritiesPage( viewModel = viewModel, isTablet = isTablet, - horizontalPaddingDp = horizontalPaddingDp, pagerState = pagerState, newArchive = newArchive, priorities = priorities diff --git a/app/src/main/java/org/permanent/permanent/ui/archiveOnboarding/compose/ArchiveTypePage.kt b/app/src/main/java/org/permanent/permanent/ui/archiveOnboarding/compose/ArchiveTypePage.kt index 8fa1c544..b20be59d 100644 --- a/app/src/main/java/org/permanent/permanent/ui/archiveOnboarding/compose/ArchiveTypePage.kt +++ b/app/src/main/java/org/permanent/permanent/ui/archiveOnboarding/compose/ArchiveTypePage.kt @@ -12,7 +12,6 @@ import androidx.compose.foundation.layout.fillMaxHeight import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.height import androidx.compose.foundation.layout.padding -import androidx.compose.foundation.layout.width import androidx.compose.foundation.pager.PagerState import androidx.compose.material3.Text import androidx.compose.runtime.Composable @@ -42,7 +41,6 @@ import org.permanent.permanent.models.ArchiveType import org.permanent.permanent.ui.composeComponents.ButtonColor import org.permanent.permanent.ui.composeComponents.ButtonIconAlignment import org.permanent.permanent.ui.composeComponents.SmallTextAndIconButton -import org.permanent.permanent.ui.composeComponents.TextAndIconButton @Composable fun ArchiveTypePage( @@ -85,7 +83,7 @@ private fun TabletBody( .weight(1f) ) { val titleText = stringResource(id = R.string.create_your_first_archive_title) - val boldedWord = "archive" + val boldedWord = "Archive" val start = titleText.indexOf(boldedWord) val spanStyles = listOf( AnnotatedString.Range( @@ -110,7 +108,7 @@ private fun TabletBody( .weight(1f), horizontalAlignment = Alignment.End ) { Text( - text = stringResource(id = R.string.create_your_first_archive_description_tablet), + text = stringResource(id = R.string.create_your_first_archive_description), fontSize = 16.sp, lineHeight = 24.sp, color = whiteColor, @@ -131,33 +129,30 @@ private fun TabletBody( horizontalArrangement = Arrangement.spacedBy(32.dp) ) { Box( - modifier = Modifier.width(120.dp) + modifier = Modifier.weight(1f) ) { - SmallTextAndIconButton( - ButtonColor.TRANSPARENT, - text = stringResource(id = R.string.back), - icon = painterResource(id = R.drawable.ic_arrow_back_rounded_white), - iconAlignment = ButtonIconAlignment.START - ) { - coroutineScope.launch { - pagerState.animateScrollToPage(OnboardingPage.WELCOME.value) + SmallTextAndIconButton( + buttonColor = ButtonColor.TRANSPARENT, + text = stringResource(id = R.string.back), + icon = painterResource(id = R.drawable.ic_arrow_back_rounded_white), + iconAlignment = ButtonIconAlignment.START + ) { + coroutineScope.launch { + pagerState.animateScrollToPage(OnboardingPage.WELCOME.value) + } } - } } - val text = - if (archiveTypeName == context.getString(R.string.individual) || archiveTypeName == context.getString( - R.string.organization - ) - ) stringResource( - id = R.string.lets_create_an_archive, archiveTypeName - ) else stringResource(id = R.string.lets_create_a_archive, archiveTypeName) - - TextAndIconButton( - style = ButtonColor.LIGHT, text = text + Box( + modifier = Modifier.weight(1f) ) { - coroutineScope.launch { - pagerState.animateScrollToPage(OnboardingPage.ARCHIVE_NAME.value) + SmallTextAndIconButton( + buttonColor = ButtonColor.LIGHT, + text = stringResource(id = R.string.next) + ) { + coroutineScope.launch { + pagerState.animateScrollToPage(OnboardingPage.ARCHIVE_NAME.value) + } } } } @@ -181,7 +176,7 @@ private fun PhoneBody( verticalArrangement = Arrangement.spacedBy(24.dp) ) { val titleText = stringResource(id = R.string.create_your_first_archive_title) - val boldedWord = "archive" + val boldedWord = "Archive" val start = titleText.indexOf(boldedWord) val spanStyles = listOf( AnnotatedString.Range( diff --git a/app/src/main/java/org/permanent/permanent/ui/archiveOnboarding/compose/GoalsPage.kt b/app/src/main/java/org/permanent/permanent/ui/archiveOnboarding/compose/GoalsPage.kt index ec4ac04e..61c629bf 100644 --- a/app/src/main/java/org/permanent/permanent/ui/archiveOnboarding/compose/GoalsPage.kt +++ b/app/src/main/java/org/permanent/permanent/ui/archiveOnboarding/compose/GoalsPage.kt @@ -12,7 +12,6 @@ import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.height import androidx.compose.foundation.layout.padding -import androidx.compose.foundation.layout.width import androidx.compose.foundation.layout.wrapContentHeight import androidx.compose.foundation.lazy.grid.GridCells import androidx.compose.foundation.lazy.grid.LazyVerticalGrid @@ -28,11 +27,9 @@ import androidx.compose.runtime.rememberCoroutineScope import androidx.compose.runtime.saveable.Saver import androidx.compose.runtime.saveable.listSaver import androidx.compose.runtime.snapshots.SnapshotStateList -import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.Color -import androidx.compose.ui.platform.LocalConfiguration -import androidx.compose.ui.platform.LocalContext +import androidx.compose.ui.res.colorResource import androidx.compose.ui.res.painterResource import androidx.compose.ui.res.stringResource import androidx.compose.ui.text.AnnotatedString @@ -40,13 +37,10 @@ import androidx.compose.ui.text.SpanStyle import androidx.compose.ui.text.font.Font import androidx.compose.ui.text.font.FontFamily import androidx.compose.ui.text.font.FontWeight -import androidx.compose.ui.unit.Dp import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp -import androidx.compose.ui.unit.times import androidx.constraintlayout.compose.ConstraintLayout import androidx.constraintlayout.compose.Dimension -import androidx.core.content.ContextCompat import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.launch import org.permanent.permanent.R @@ -61,39 +55,20 @@ import org.permanent.permanent.viewmodels.ArchiveOnboardingViewModel fun GoalsPage( viewModel: ArchiveOnboardingViewModel, isTablet: Boolean, - horizontalPaddingDp: Dp, pagerState: PagerState, newArchive: NewArchive, goals: SnapshotStateList ) { - val context = LocalContext.current val coroutineScope = rememberCoroutineScope() val regularFont = FontFamily(Font(R.font.open_sans_regular_ttf)) - val whiteColor = Color(ContextCompat.getColor(context, R.color.white)) - val whiteSuperTransparentColor = - Color(ContextCompat.getColor(context, R.color.whiteSuperExtraTransparent)) if (isTablet) { TabletBody( - viewModel, - horizontalPaddingDp, - whiteColor, - regularFont, - coroutineScope, - pagerState, - newArchive, - goals + viewModel, regularFont, coroutineScope, pagerState, newArchive, goals ) } else { PhoneBody( - viewModel, - whiteSuperTransparentColor, - whiteColor, - regularFont, - coroutineScope, - pagerState, - newArchive, - goals + viewModel, regularFont, coroutineScope, pagerState, newArchive, goals ) } } @@ -101,8 +76,6 @@ fun GoalsPage( @Composable private fun PhoneBody( viewModel: ArchiveOnboardingViewModel, - whiteSuperTransparentColor: Color, - whiteColor: Color, regularFont: FontFamily, coroutineScope: CoroutineScope, pagerState: PagerState, @@ -143,7 +116,7 @@ private fun PhoneBody( text = AnnotatedString(text = titleText, spanStyles = spanStyles), fontSize = 32.sp, lineHeight = 48.sp, - color = whiteColor, + color = Color.White, fontFamily = regularFont ) @@ -151,7 +124,7 @@ private fun PhoneBody( text = stringResource(id = R.string.chart_your_path_description), fontSize = 14.sp, lineHeight = 24.sp, - color = whiteColor, + color = Color.White, fontFamily = regularFont ) @@ -172,7 +145,7 @@ private fun PhoneBody( start.linkTo(parent.start) end.linkTo(parent.end) width = Dimension.fillToConstraints - }, thickness = 1.dp, color = whiteSuperTransparentColor + }, thickness = 1.dp, color = colorResource(id = R.color.whiteSuperExtraTransparent) ) Spacer(modifier = Modifier @@ -232,18 +205,12 @@ private fun PhoneBody( @Composable private fun TabletBody( viewModel: ArchiveOnboardingViewModel, - horizontalPaddingDp: Dp, - whiteColor: Color, regularFont: FontFamily, coroutineScope: CoroutineScope, pagerState: PagerState, newArchive: NewArchive, goals: SnapshotStateList ) { - val configuration = LocalConfiguration.current - val oneThirdOfScreenDp = (configuration.screenWidthDp.dp - 2 * horizontalPaddingDp) / 3 - val spacerWidth = 32.dp - Column( modifier = Modifier .fillMaxSize() @@ -254,12 +221,10 @@ private fun TabletBody( modifier = Modifier .fillMaxWidth() .wrapContentHeight(), - horizontalArrangement = Arrangement.End, + horizontalArrangement = Arrangement.spacedBy(32.dp), ) { Column( - modifier = Modifier.width(2 * (oneThirdOfScreenDp) - spacerWidth / 2), - horizontalAlignment = Alignment.Start, - verticalArrangement = Arrangement.Top + modifier = Modifier.weight(1f) ) { val titleText = stringResource(id = R.string.chart_your_path_title) val boldedWord = "path" @@ -276,22 +241,19 @@ private fun TabletBody( text = AnnotatedString(text = titleText, spanStyles = spanStyles), fontSize = 56.sp, lineHeight = 72.sp, - color = whiteColor, + color = Color.White, fontFamily = regularFont ) } - Spacer(modifier = Modifier.width(spacerWidth)) - Column( - modifier = Modifier.width(oneThirdOfScreenDp - spacerWidth / 2), - horizontalAlignment = Alignment.End + modifier = Modifier.weight(1f) ) { Text( text = stringResource(id = R.string.chart_your_path_description), fontSize = 16.sp, lineHeight = 24.sp, - color = whiteColor, + color = Color.White, fontFamily = regularFont ) } @@ -301,7 +263,7 @@ private fun TabletBody( modifier = Modifier .fillMaxWidth() .weight(1f), - columns = GridCells.Fixed(3), + columns = GridCells.Fixed(4), horizontalArrangement = Arrangement.spacedBy(16.dp), verticalArrangement = Arrangement.spacedBy(16.dp) ) { @@ -318,43 +280,47 @@ private fun TabletBody( modifier = Modifier .fillMaxWidth() .wrapContentHeight(), - horizontalArrangement = Arrangement.End, + horizontalArrangement = Arrangement.spacedBy(32.dp), ) { - Row( - modifier = Modifier.width(oneThirdOfScreenDp - spacerWidth / 2) + Column( + modifier = Modifier.weight(1f) + ) {} + + Column( + modifier = Modifier.weight(1f) ) { - Box( - modifier = Modifier - .fillMaxWidth() - .weight(1f) + Row( + modifier = Modifier.fillMaxWidth(), + horizontalArrangement = Arrangement.spacedBy(32.dp) ) { - SmallTextAndIconButton( - buttonColor = ButtonColor.TRANSPARENT, - text = stringResource(id = R.string.back), - icon = painterResource(id = R.drawable.ic_arrow_back_rounded_white), - iconAlignment = ButtonIconAlignment.START + Box( + modifier = Modifier.weight(1f) ) { - val backPage = - if (viewModel.isAcceptedArchiveFlow.value) OnboardingPage.WELCOME.value else OnboardingPage.ARCHIVE_NAME.value - coroutineScope.launch { - pagerState.animateScrollToPage(backPage) + SmallTextAndIconButton( + buttonColor = ButtonColor.TRANSPARENT, + text = stringResource(id = R.string.back), + icon = painterResource(id = R.drawable.ic_arrow_back_rounded_white), + iconAlignment = ButtonIconAlignment.START + ) { + val backPage = + if (viewModel.isAcceptedArchiveFlow.value) OnboardingPage.WELCOME.value else OnboardingPage.ARCHIVE_NAME.value + coroutineScope.launch { + pagerState.animateScrollToPage(backPage) + } } } - } - Spacer(modifier = Modifier.width(32.dp)) - - Box( - modifier = Modifier - .fillMaxWidth() - .weight(1f) - ) { - SmallTextAndIconButton( - buttonColor = ButtonColor.LIGHT, text = stringResource(id = R.string.next) + Box( + modifier = Modifier.weight(1f) ) { - newArchive.goals = goals - coroutineScope.launch { - pagerState.animateScrollToPage(OnboardingPage.PRIORITIES.value) + SmallTextAndIconButton( + buttonColor = ButtonColor.LIGHT, + text = stringResource(id = R.string.next) + ) { + newArchive.goals = goals + coroutineScope.launch { + pagerState.animateScrollToPage(OnboardingPage.PRIORITIES.value) + } } } } diff --git a/app/src/main/java/org/permanent/permanent/ui/archiveOnboarding/compose/PrioritiesPage.kt b/app/src/main/java/org/permanent/permanent/ui/archiveOnboarding/compose/PrioritiesPage.kt index 29239df3..1a021c72 100644 --- a/app/src/main/java/org/permanent/permanent/ui/archiveOnboarding/compose/PrioritiesPage.kt +++ b/app/src/main/java/org/permanent/permanent/ui/archiveOnboarding/compose/PrioritiesPage.kt @@ -12,7 +12,6 @@ import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.height import androidx.compose.foundation.layout.padding -import androidx.compose.foundation.layout.width import androidx.compose.foundation.layout.wrapContentHeight import androidx.compose.foundation.lazy.grid.GridCells import androidx.compose.foundation.lazy.grid.LazyVerticalGrid @@ -31,11 +30,9 @@ import androidx.compose.runtime.rememberCoroutineScope import androidx.compose.runtime.saveable.Saver import androidx.compose.runtime.saveable.listSaver import androidx.compose.runtime.snapshots.SnapshotStateList -import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.Color -import androidx.compose.ui.platform.LocalConfiguration -import androidx.compose.ui.platform.LocalContext +import androidx.compose.ui.res.colorResource import androidx.compose.ui.res.painterResource import androidx.compose.ui.res.stringResource import androidx.compose.ui.text.AnnotatedString @@ -43,13 +40,10 @@ import androidx.compose.ui.text.SpanStyle import androidx.compose.ui.text.font.Font import androidx.compose.ui.text.font.FontFamily import androidx.compose.ui.text.font.FontWeight -import androidx.compose.ui.unit.Dp import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp -import androidx.compose.ui.unit.times import androidx.constraintlayout.compose.ConstraintLayout import androidx.constraintlayout.compose.Dimension -import androidx.core.content.ContextCompat import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.launch import org.permanent.permanent.R @@ -63,17 +57,13 @@ import org.permanent.permanent.viewmodels.ArchiveOnboardingViewModel fun PrioritiesPage( viewModel: ArchiveOnboardingViewModel, isTablet: Boolean, - horizontalPaddingDp: Dp, pagerState: PagerState, newArchive: NewArchive, priorities: SnapshotStateList ) { - val context = LocalContext.current val coroutineScope = rememberCoroutineScope() val regularFont = FontFamily(Font(R.font.open_sans_regular_ttf)) - val whiteColor = Color(ContextCompat.getColor(context, R.color.white)) - val whiteSuperTransparentColor = - Color(ContextCompat.getColor(context, R.color.whiteSuperExtraTransparent)) + val whiteSuperTransparentColor = colorResource(id = R.color.whiteSuperExtraTransparent) val newArchiveCallsSuccess by viewModel.newArchiveCallsSuccess.collectAsState() @@ -86,20 +76,12 @@ fun PrioritiesPage( if (isTablet) { TabletBody( - viewModel, - horizontalPaddingDp, - whiteColor, - regularFont, - coroutineScope, - pagerState, - newArchive, - priorities + viewModel, regularFont, coroutineScope, pagerState, newArchive, priorities ) } else { PhoneBody( viewModel, whiteSuperTransparentColor, - whiteColor, regularFont, coroutineScope, pagerState, @@ -113,7 +95,6 @@ fun PrioritiesPage( private fun PhoneBody( viewModel: ArchiveOnboardingViewModel, whiteSuperTransparentColor: Color, - whiteColor: Color, regularFont: FontFamily, coroutineScope: CoroutineScope, pagerState: PagerState, @@ -153,7 +134,7 @@ private fun PhoneBody( text = AnnotatedString(text = titleText, spanStyles = spanStyles), fontSize = 32.sp, lineHeight = 48.sp, - color = whiteColor, + color = Color.White, fontFamily = regularFont ) @@ -161,7 +142,7 @@ private fun PhoneBody( text = stringResource(id = R.string.tell_us_description), fontSize = 14.sp, lineHeight = 24.sp, - color = whiteColor, + color = Color.White, fontFamily = regularFont ) @@ -238,18 +219,12 @@ private fun PhoneBody( @Composable private fun TabletBody( viewModel: ArchiveOnboardingViewModel, - horizontalPaddingDp: Dp, - whiteColor: Color, regularFont: FontFamily, coroutineScope: CoroutineScope, pagerState: PagerState, newArchive: NewArchive, priorities: SnapshotStateList ) { - val configuration = LocalConfiguration.current - val oneThirdOfScreenDp = (configuration.screenWidthDp.dp - 2 * horizontalPaddingDp) / 3 - val spacerWidth = 32.dp - Column( modifier = Modifier .fillMaxSize() @@ -260,12 +235,10 @@ private fun TabletBody( modifier = Modifier .fillMaxWidth() .wrapContentHeight(), - horizontalArrangement = Arrangement.End, + horizontalArrangement = Arrangement.spacedBy(32.dp), ) { Column( - modifier = Modifier.width(2 * (oneThirdOfScreenDp) - spacerWidth / 2), - horizontalAlignment = Alignment.Start, - verticalArrangement = Arrangement.Top + modifier = Modifier.weight(1f) ) { val titleText = stringResource(id = R.string.tell_us_title) val boldedWord = "important" @@ -282,22 +255,19 @@ private fun TabletBody( text = AnnotatedString(text = titleText, spanStyles = spanStyles), fontSize = 56.sp, lineHeight = 72.sp, - color = whiteColor, + color = Color.White, fontFamily = regularFont ) } - Spacer(modifier = Modifier.width(spacerWidth)) - Column( - modifier = Modifier.width(oneThirdOfScreenDp - spacerWidth / 2), - horizontalAlignment = Alignment.End + modifier = Modifier.weight(1f) ) { Text( text = stringResource(id = R.string.tell_us_description), fontSize = 16.sp, lineHeight = 24.sp, - color = whiteColor, + color = Color.White, fontFamily = regularFont ) } @@ -307,7 +277,7 @@ private fun TabletBody( modifier = Modifier .fillMaxWidth() .weight(1f), - columns = GridCells.Fixed(3), + columns = GridCells.Fixed(4), horizontalArrangement = Arrangement.spacedBy(16.dp), verticalArrangement = Arrangement.spacedBy(16.dp) ) { @@ -326,40 +296,44 @@ private fun TabletBody( modifier = Modifier .fillMaxWidth() .wrapContentHeight(), - horizontalArrangement = Arrangement.End, + horizontalArrangement = Arrangement.spacedBy(32.dp), ) { - Row( - modifier = Modifier.width(oneThirdOfScreenDp - spacerWidth / 2) + Column( + modifier = Modifier.weight(1f) + ) {} + + Column( + modifier = Modifier.weight(1f) ) { - Box( - modifier = Modifier - .fillMaxWidth() - .weight(1f) + Row( + modifier = Modifier.fillMaxWidth(), + horizontalArrangement = Arrangement.spacedBy(32.dp) ) { - SmallTextAndIconButton( - buttonColor = ButtonColor.TRANSPARENT, - text = stringResource(id = R.string.back), - icon = painterResource(id = R.drawable.ic_arrow_back_rounded_white), - iconAlignment = ButtonIconAlignment.START + Box( + modifier = Modifier.weight(1f) ) { - coroutineScope.launch { - pagerState.animateScrollToPage(OnboardingPage.GOALS.value) + SmallTextAndIconButton( + buttonColor = ButtonColor.TRANSPARENT, + text = stringResource(id = R.string.back), + icon = painterResource(id = R.drawable.ic_arrow_back_rounded_white), + iconAlignment = ButtonIconAlignment.START + ) { + coroutineScope.launch { + pagerState.animateScrollToPage(OnboardingPage.GOALS.value) + } } } - } - Spacer(modifier = Modifier.width(32.dp)) - - Box( - modifier = Modifier - .fillMaxWidth() - .weight(1f) - ) { - SmallTextAndIconButton( - buttonColor = ButtonColor.LIGHT, text = stringResource(id = R.string.next) + Box( + modifier = Modifier.weight(1f) ) { - newArchive.priorities = priorities - viewModel.onNextButtonClick(newArchive) + SmallTextAndIconButton( + buttonColor = ButtonColor.LIGHT, + text = stringResource(id = R.string.next) + ) { + newArchive.priorities = priorities + viewModel.onNextButtonClick(newArchive) + } } } } diff --git a/app/src/main/java/org/permanent/permanent/ui/composeComponents/CustomCheckbox.kt b/app/src/main/java/org/permanent/permanent/ui/composeComponents/CustomCheckbox.kt index 0dda3d1c..b8ed7c06 100644 --- a/app/src/main/java/org/permanent/permanent/ui/composeComponents/CustomCheckbox.kt +++ b/app/src/main/java/org/permanent/permanent/ui/composeComponents/CustomCheckbox.kt @@ -59,11 +59,11 @@ fun CustomCheckbox( .clickable { checkedState.value = !checkedState.value }, - horizontalArrangement = Arrangement.spacedBy(24.dp), + horizontalArrangement = Arrangement.spacedBy(16.dp), verticalAlignment = Alignment.CenterVertically ) { Checkbox( - modifier = Modifier.padding(start = 24.dp), + modifier = Modifier.padding(start = 16.dp), checked = checkedState.value, onCheckedChange = { checkedState.value = it }, colors = CheckboxDefaults.colors( @@ -74,10 +74,10 @@ fun CustomCheckbox( ) Text( - modifier = Modifier.padding(top = 24.dp, bottom = 24.dp, end = 24.dp), + modifier = Modifier.padding(top = 24.dp, bottom = 24.dp, end = 16.dp), text = text, - fontSize = if (isTablet) 18.sp else 14.sp, - lineHeight = if (isTablet) 30.sp else 24.sp, + fontSize = 14.sp, + lineHeight = 24.sp, color = Color.White, fontFamily = regularFont ) diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 2cece628..59724fb9 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -542,28 +542,27 @@ Hello, %s.\nWelcome to Permanent! We’re so glad you’re here!\n\nAt Permanent, it is our mission to provide a safe and secure place to store, preserve, and share the digital legacy of all people, whether that\'s for you or for your friends, family, interests or organizations.\n\nWe know that starting this journey can sometimes be overwhelming, but don’t worry. We’re here to help you every step of the way. You’ve been invited to collaborate on an archive as an archive member. A Permanent archive is the collection of digital materials about an individual, family or group, or organizational entity. Get started by accepting an invitation, or by creating a new archive of your own. - Create your first archive. + Create your first Archive What do you plan to capture and preserve with your first archive? - With my first archive, I plan to capture and preserve material about… Personal Create an archive that captures my personal life journey. Individual - Create an archive that captures a person’s life. + Create an archive that captures a person’s life journey. Family Create an archive that captures my family life. Family History Create an archive that captures my family history. Community - Create an archive that captures a community life. + Create an archive that captures a community\'s life. Organization - Create an archive that captures an organization life. + Create an archive that captures an organization\'s life. Let’s create a %s archive Let’s create an %s archive Create your %s archive - Name your new archive. This is the formal or official name of the person, family, group, or organization the archive is about. You can edit the name later if needed. + Name your new archive. This is the formal or official name of the person, family, group, or organization the archive represents. You can edit the name later if needed. Create the archive Chart your\npath to success - Let’s set some goals. Everyone has unique goals for preserving their legacy. We want to learn more about how we can help you achieve yours. + Let’s set some goals. Everyone has unique goals for preserving their legacy. We want to learn more about how we can help you achieve yours.\n\nMy goal is to… Tell us what’s\nimportant to you Finally, we’re curious — what brought you to Permanent.org? Congratulations!