TextObfuscationMode


Defines how the text will be obscured in secure text fields.

Text obscuring refers to replacing the original text content with a mask via various methods. It is most common in password fields.

Users are generally accustomed to different default experiences for secure text input on various platforms. On desktop, the convention is to keep the input entirely hidden. Conversely, mobile platforms typically offer a brief reveal of the last typed character. This reveal lasts for a short duration or until another character is entered, aiding users in tracking their input while maintaining privacy by not exposing too much information.

Summary

Public companion properties

TextObfuscationMode

All characters are hidden.

Cmn
TextObfuscationMode

Reveals the last typed character for a short amount of time.

Cmn
TextObfuscationMode

Do not obscure any content, making all the content visible.

Cmn

Public properties

Int
Cmn

Public companion properties

Hidden

val HiddenTextObfuscationMode

All characters are hidden.

RevealLastTyped

val RevealLastTypedTextObfuscationMode

Reveals the last typed character for a short amount of time.

Note; on Android this feature also depends on a system setting called Settings.System.TEXT_SHOW_PASSWORD. If the system setting is disabled, this option behaves exactly as Hidden.

Visible

val VisibleTextObfuscationMode

Do not obscure any content, making all the content visible.

It can be useful when you want to briefly reveal the content by toggling a reveal icon.

Public properties

value

val valueInt