diff --git a/wallet_app/app/src/main/java/com/example/walletapp/ui/WalletApp.kt b/wallet_app/app/src/main/java/com/example/walletapp/ui/WalletApp.kt index b6426f6..9a91f95 100644 --- a/wallet_app/app/src/main/java/com/example/walletapp/ui/WalletApp.kt +++ b/wallet_app/app/src/main/java/com/example/walletapp/ui/WalletApp.kt @@ -68,17 +68,20 @@ fun WalletApp(tokenViewModel: TokenViewModel) { } composable { CreateAccountScreen( - onContinue = { navController.navigate( route = FinalizeAccountCreation )} + onContinue = { navController.navigate( route = FinalizeAccountCreation )}, + onBackButtonPressed = {navController.navigateUp()} ) } composable { FinalizeAccountCreationScreen( - onContinue = { navController.navigate( route = CreatePin )} + onContinue = { navController.navigate( route = CreatePin )}, + onBackButtonPressed = { navController.navigateUp() } ) } composable { ImportAccountScreen( - onFinishAccountImport = { navController.navigate( route = CreatePin ) } + onFinishAccountImport = { navController.navigate( route = CreatePin ) }, + onBackButtonPressed = { navController.navigateUp() } ) } composable { diff --git a/wallet_app/app/src/main/java/com/example/walletapp/ui/onboarding/CreateAccountScreen.kt b/wallet_app/app/src/main/java/com/example/walletapp/ui/onboarding/CreateAccountScreen.kt index dc78bac..8f39553 100644 --- a/wallet_app/app/src/main/java/com/example/walletapp/ui/onboarding/CreateAccountScreen.kt +++ b/wallet_app/app/src/main/java/com/example/walletapp/ui/onboarding/CreateAccountScreen.kt @@ -30,6 +30,7 @@ import androidx.compose.material.icons.filled.ArrowBack import androidx.compose.material.icons.filled.ArrowForward import androidx.compose.material.icons.filled.Refresh import androidx.compose.material3.ExperimentalMaterial3Api +import androidx.compose.material3.IconButton import androidx.compose.material3.ModalBottomSheet import androidx.compose.material3.SheetState import androidx.compose.material3.TopAppBarDefaults @@ -57,12 +58,47 @@ import kotlinx.coroutines.CoroutineScope @OptIn(ExperimentalMaterial3Api::class) @Composable fun CreateAccountScreen( - onContinue: () -> Unit + onContinue: () -> Unit, + onBackButtonPressed: () -> Unit ) { var progress by remember { mutableStateOf(0.5f) } Scaffold( topBar = { TopAppBar( + backgroundColor = Color("#0C0C4F".toColorInt()), + contentColor = Color.White, + elevation = 4.dp + ) { + Row( + modifier = Modifier + .fillMaxWidth() + .padding(top = 32.dp, start = 16.dp, end = 16.dp), + + ) { + IconButton(onClick = onBackButtonPressed) { + Icon( + imageVector = Icons.Filled.ArrowBack, + contentDescription = "Backward Arrow", + modifier = Modifier.padding(start = 8.dp), + tint = Color.White + ) + } + + Box( + modifier = Modifier.fillMaxWidth(), + contentAlignment = Alignment.Center, + ) { + + Text( + text = "Create Account", + color = Color.White, + fontSize = 20.sp + ) + + } + + } + } title = { Text("Create Account", color = Color.White, fontSize = 20.sp) }, navigationIcon = { Icon( diff --git a/wallet_app/app/src/main/java/com/example/walletapp/ui/onboarding/FinalizeAccountCreationScreen.kt b/wallet_app/app/src/main/java/com/example/walletapp/ui/onboarding/FinalizeAccountCreationScreen.kt index c526a73..a0dedd2 100644 --- a/wallet_app/app/src/main/java/com/example/walletapp/ui/onboarding/FinalizeAccountCreationScreen.kt +++ b/wallet_app/app/src/main/java/com/example/walletapp/ui/onboarding/FinalizeAccountCreationScreen.kt @@ -35,10 +35,47 @@ import com.example.walletapp.R @OptIn(ExperimentalMaterial3Api::class) @Composable -fun FinalizeAccountCreationScreen(onContinue: () -> Unit) { +fun FinalizeAccountCreationScreen( + onContinue: () -> Unit, + onBackButtonPressed: () -> Unit +) { Scaffold( topBar = { TopAppBar( + backgroundColor = Color("#0C0C4F".toColorInt()), + contentColor = Color.White, + elevation = 4.dp + ) { + Row( + modifier = Modifier + .fillMaxWidth() + .padding(top = 32.dp, start = 16.dp, end = 16.dp), + + ) { + IconButton(onClick = onBackButtonPressed) { + Icon( + imageVector = Icons.Filled.ArrowBack, + contentDescription = "Backward Arrow", + modifier = Modifier.padding(start = 8.dp), + tint = Color.White + ) + } + + Box( + modifier = Modifier.fillMaxWidth(), + contentAlignment = Alignment.Center, + ) { + + Text( + text = "Create Account", + color = Color.White, + fontSize = 20.sp + ) + + } + + } + } title = { Text("Create Account", color = Color.White, fontSize = 20.sp) }, navigationIcon = { Icon( diff --git a/wallet_app/app/src/main/java/com/example/walletapp/ui/onboarding/ImportAccountScreen.kt b/wallet_app/app/src/main/java/com/example/walletapp/ui/onboarding/ImportAccountScreen.kt index ce43fd9..634b8c7 100644 --- a/wallet_app/app/src/main/java/com/example/walletapp/ui/onboarding/ImportAccountScreen.kt +++ b/wallet_app/app/src/main/java/com/example/walletapp/ui/onboarding/ImportAccountScreen.kt @@ -26,6 +26,7 @@ import androidx.compose.material3.Text import androidx.compose.material3.TextFieldDefaults import androidx.compose.material3.TopAppBar import androidx.compose.material3.ExperimentalMaterial3Api +import androidx.compose.material3.IconButton import androidx.compose.material3.ModalBottomSheet import androidx.compose.material3.SheetState import androidx.compose.material3.rememberModalBottomSheetState @@ -55,11 +56,49 @@ import kotlinx.coroutines.CoroutineScope @OptIn(ExperimentalMaterial3Api::class) @Composable +fun ImportAccountScreen( + onFinishAccountImport: () -> Unit, + onBackButtonPressed: () -> Unit +) { fun ImportAccountScreen(onFinishAccountImport: () -> Unit) { var progress by remember { mutableStateOf(0.5f) } Scaffold( topBar = { TopAppBar( + backgroundColor = Color("#0C0C4F".toColorInt()), + contentColor = Color.White, + elevation = 4.dp + ) { + Row( + modifier = Modifier + .fillMaxWidth() + .padding(top = 32.dp, start = 16.dp, end = 16.dp), + + ) { + IconButton(onClick = onBackButtonPressed) { + Icon( + imageVector = Icons.Filled.ArrowBack, + contentDescription = "Backward Arrow", + modifier = Modifier.padding(start = 8.dp), + tint = Color.White + ) + } + + Box( + modifier = Modifier.fillMaxWidth(), + contentAlignment = Alignment.Center, + ) { + + Text( + text = "Import existing wallet", + color = Color.White, + fontSize = 20.sp + ) + + } + + } + } title = { Text("Import existing wallet", color = Color.White, fontSize = 20.sp) }, navigationIcon = { Icon(