How to trigger the incognito keyboard in Android using jet pack compose without relying on the XML files?

46 Views Asked by At

Most android keyboards have a flag for incognito. Not all keyboards respect it. In the case of GBoard, you can use the flag "flagNoPersonalizedLearning" from the IME Options section when creating an EditText inside a View with xml. But what about compose? Sure Compose TexField has the keyboardOptions argument but i found no documentation about using it for incognito mode. Also, when passing "flagNoPersonalizedLearning" into imeOptions like so

OutlinedTextField(
...
keyboardOptions = KeyboardOptions(imeOptions = ImeOptions("flagNoPersonalizedLearning")),
...
)

Doesn't trigger it either So how do we trigger incognito mode in a Jetpack Compose with no views?

I tried the above mentioned approach and i expected to trigger the incognito mode in gboard. Unfortunately, it didn't work as expected.

0

There are 0 best solutions below