Skip to content

Passcode Verification Screen

Use the Passcode Verification screen to verify the passcode created by the passcode creation screen.

Passcode Verification Screen

Definition

@Composable
fun VerifyPasscodeScreen(
    codeToCompare: String,
    verifyPasscodeScreenSettings: VerifyPasscodeScreenSettings? = null,
    nextButtonClickListener: ViewClickListener? = null,
    backButtonClickListener: ViewClickListener? = null
) { ... }

data class VerifyPasscodeScreenSettings(
    @StringRes val title: Int = R.string.verify_passcode_screen_title,
    @StringRes val description: Int = R.string.verify_passcode_screen_desc,
    @StringRes val passcodeLabel: Int = R.string.label_passcode,
    @StringRes val passcodePlaceholder: Int = R.string.set_passcode_screen_passcode_placeholder,
    @StringRes val doneButtonCaption: Int = R.string.label_done,
    @StringRes val backButtonCaption: Int = R.string.label_back,
    val illustrationSettings: IllustrationSettings = IllustrationSettings(
        iconId = com.sap.cloud.mobile.fiori.theme.R.drawable.img_sap_passwords
    )
): BaseScreenSettings

codeToCompare is the passcode created on the passcode creation screen. The Next button will be enabled only if the passcode collected in this screen is the same as codeToCompare.

Example

VerifyPasscodeScreen(
    codeToCompare = passcode,
    nextButtonClickListener = {
        //navigate to the next step.
    },
    backButtonClickListener = {
        navController?.popBackStack()
    }
)

Last update: April 5, 2024