From 6942fe12b59631b1565bc9fc87dec31ca6a52342 Mon Sep 17 00:00:00 2001 From: weishu Date: Thu, 22 Jun 2023 16:46:29 +0800 Subject: [PATCH] manager: set keyboard options for inputtext --- .../kernelsu/ui/component/profile/RootProfileConfig.kt | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/manager/app/src/main/java/me/weishu/kernelsu/ui/component/profile/RootProfileConfig.kt b/manager/app/src/main/java/me/weishu/kernelsu/ui/component/profile/RootProfileConfig.kt index eaf0aa2a..5072a66d 100644 --- a/manager/app/src/main/java/me/weishu/kernelsu/ui/component/profile/RootProfileConfig.kt +++ b/manager/app/src/main/java/me/weishu/kernelsu/ui/component/profile/RootProfileConfig.kt @@ -371,6 +371,10 @@ private fun SELinuxPanel(profile: Natives.Profile, onSELinuxChange: (domain: Str ), type = InputTextFieldType.OUTLINED, required = true, + keyboardOptions = KeyboardOptions( + keyboardType = KeyboardType.Ascii, + imeAction = ImeAction.Next + ), resultListener = { domain = it ?: "" }, @@ -387,6 +391,10 @@ private fun SELinuxPanel(profile: Natives.Profile, onSELinuxChange: (domain: Str title = stringResource(id = R.string.profile_selinux_rules), ), type = InputTextFieldType.OUTLINED, + keyboardOptions = KeyboardOptions( + keyboardType = KeyboardType.Ascii, + imeAction = ImeAction.Done + ), singleLine = false, resultListener = { rules = it ?: "" @@ -394,7 +402,7 @@ private fun SELinuxPanel(profile: Natives.Profile, onSELinuxChange: (domain: Str validationListener = { value -> if (isSepolicyValid(value)) ValidationResult.Valid else ValidationResult.Invalid("Rules must be valid sepolicy") - } + }, ) )