Reputation: 45
I know how to disable the keyboard toolbar through the settings but was curious if anyone knew of a way to disable it through programming? Thanks
Upvotes: 4
Views: 1626
Reputation: 61
In Jetpack Compose, in BasicTextField, one of the parameters could be keyboardOptions, which could contain platformImeOptions, like this:
keyboardOptions = KeyboardOptions.Default.copy(
keyboardType = KeyboardType.Password,
autoCorrect = false,
capitalization = KeyboardCapitalization.Characters,
platformImeOptions = AndroidImeOptions(privateImeOptions = "disableToolbar=true")
),
Upvotes: 1
Reputation: 462
I was messing around with this quite a bit today because our app runs in kiosk mode and the Samsung keyboard toolbar effectively provides a backdoor into the Android OS Settings which is obviously not ideal for an app running in kiosk mode.
Anyhow, adding the following properties is what finally did the trick for me. I hope this helps someone out.
android:inputType="textPassword|textVisiblePassword"
android:privateImeOptions="disableToolbar=true"
Upvotes: 7