diff --git a/app/src/main/java/com/github/damontecres/wholphin/ui/setup/PinEntry.kt b/app/src/main/java/com/github/damontecres/wholphin/ui/setup/PinEntry.kt index e0d49631..f9f22591 100644 --- a/app/src/main/java/com/github/damontecres/wholphin/ui/setup/PinEntry.kt +++ b/app/src/main/java/com/github/damontecres/wholphin/ui/setup/PinEntry.kt @@ -25,6 +25,7 @@ import androidx.compose.ui.input.key.key import androidx.compose.ui.input.key.onKeyEvent import androidx.compose.ui.input.key.type import androidx.compose.ui.res.stringResource +import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp import androidx.tv.material3.MaterialTheme @@ -72,6 +73,16 @@ fun PinEntry( Key.DirectionRight -> "R" Key.DirectionDown -> "D" Key.DirectionLeft -> "L" + Key.Zero, Key.NumPad0 -> "0" + Key.One, Key.NumPad1 -> "1" + Key.Two, Key.NumPad2 -> "2" + Key.Three, Key.NumPad3 -> "3" + Key.Four, Key.NumPad4 -> "4" + Key.Five, Key.NumPad5 -> "5" + Key.Six, Key.NumPad6 -> "6" + Key.Seven, Key.NumPad7 -> "7" + Key.Eight, Key.NumPad8 -> "8" + Key.Nine, Key.NumPad9 -> "9" else -> return@onKeyEvent false } onTextChange.invoke(str) @@ -122,6 +133,16 @@ fun PinEntryCreate( Key.DirectionRight -> "R" Key.DirectionDown -> "D" Key.DirectionLeft -> "L" + Key.Zero, Key.NumPad0 -> "0" + Key.One, Key.NumPad1 -> "1" + Key.Two, Key.NumPad2 -> "2" + Key.Three, Key.NumPad3 -> "3" + Key.Four, Key.NumPad4 -> "4" + Key.Five, Key.NumPad5 -> "5" + Key.Six, Key.NumPad6 -> "6" + Key.Seven, Key.NumPad7 -> "7" + Key.Eight, Key.NumPad8 -> "8" + Key.Nine, Key.NumPad9 -> "9" else -> return@onKeyEvent false } onTextChange.invoke(str) @@ -154,6 +175,7 @@ fun PinEntryCreate( @Composable fun PinArrowRow(modifier: Modifier = Modifier) { Row( + verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(8.dp), modifier = modifier, ) { @@ -167,6 +189,12 @@ fun PinArrowRow(modifier: Modifier = Modifier) { fontFamily = FontAwesome, ) } + Text( + text = stringResource(R.string.pin_digits_hint), + color = MaterialTheme.colorScheme.onSurface, + style = MaterialTheme.typography.headlineSmall, + fontWeight = FontWeight.SemiBold, + ) } } diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index afa848d6..b9b56865 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -390,6 +390,7 @@ Incorrect PIN must be 4 keys or longer Will remove PIN + [0-9] Image disk cache size (MB) View options Columns