From b355d9fb6497a8bdee47a8908193836a0cc1982b Mon Sep 17 00:00:00 2001 From: ganfra Date: Thu, 26 Oct 2023 15:28:18 +0200 Subject: [PATCH] PIN: address PR review --- .../impl/components/PinEntryTextField.kt | 21 ++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/features/lockscreen/impl/src/main/kotlin/io/element/android/features/lockscreen/impl/components/PinEntryTextField.kt b/features/lockscreen/impl/src/main/kotlin/io/element/android/features/lockscreen/impl/components/PinEntryTextField.kt index e4869e71d8..019236aba7 100644 --- a/features/lockscreen/impl/src/main/kotlin/io/element/android/features/lockscreen/impl/components/PinEntryTextField.kt +++ b/features/lockscreen/impl/src/main/kotlin/io/element/android/features/lockscreen/impl/components/PinEntryTextField.kt @@ -20,8 +20,10 @@ import androidx.compose.foundation.background import androidx.compose.foundation.border import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Box +import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.ExperimentalLayoutApi import androidx.compose.foundation.layout.FlowRow +import androidx.compose.foundation.layout.Spacer import androidx.compose.foundation.layout.size import androidx.compose.foundation.shape.RoundedCornerShape import androidx.compose.foundation.text.BasicTextField @@ -118,10 +120,19 @@ private fun PinDigitView( @Composable internal fun PinEntryTextFieldPreview() { ElementPreview { - PinEntryTextField( - pinEntry = PinEntry.createEmpty(4).fillWith("12"), - isSecured = true, - onValueChange = {}, - ) + val pinEntry = PinEntry.createEmpty(4).fillWith("12") + Column { + PinEntryTextField( + pinEntry = pinEntry, + isSecured = true, + onValueChange = {}, + ) + Spacer(modifier = Modifier.size(16.dp)) + PinEntryTextField( + pinEntry = pinEntry, + isSecured = false, + onValueChange = {}, + ) + } } }