ShowSecretsSetting
class ShowSecretsSetting
| kotlin.Any | |
| ↳ | android.text.ShowSecretsSetting |
This is the API surface for interacting with the settings that determine whether characters in password inputs or other secret fields are echoed briefly or hidden immediately.
Summary
| Public methods | |
|---|---|
| static Runnable |
registerCallback(context: Context, callback: Runnable)Registers a callback to be notified when show password settings change. |
| static Runnable |
registerCallback(context: Context, executor: Executor, callback: Runnable)Registers a callback to be notified when show password settings change. |
| static Boolean |
shouldShowPhysicalInput(context: Context)Returns |
| static Boolean |
shouldShowTouchInput(context: Context)Returns |
Public methods
registerCallback
static fun registerCallback(
context: Context,
callback: Runnable
): Runnable
Registers a callback to be notified when show password settings change. The callback will be invoked on the main thread.
| Parameters | |
|---|---|
context |
Context: The context used to access settings. This value cannot be null. |
callback |
Runnable: The callback to invoke. This value cannot be null. |
| Return | |
|---|---|
Runnable |
A runnable that unregisters the callback when run. This value cannot be null. |
registerCallback
static fun registerCallback(
context: Context,
executor: Executor,
callback: Runnable
): Runnable
Registers a callback to be notified when show password settings change.
| Parameters | |
|---|---|
context |
Context: The context used to access settings. This value cannot be null. |
executor |
Executor: The executor on which to invoke the callback. This value cannot be null. Callback and listener events are dispatched through this Executor, providing an easy way to control which thread is used. To dispatch events through the main thread of your application, you can use Context.getMainExecutor(). Otherwise, provide an Executor that dispatches to an appropriate thread. |
callback |
Runnable: The callback to invoke. This value cannot be null. |
| Return | |
|---|---|
Runnable |
A runnable that unregisters the callback when run. This value cannot be null. |
shouldShowPhysicalInput
static fun shouldShowPhysicalInput(context: Context): Boolean
Returns true when characters entered into a password, pin or other secret field from hardware/physical input sources should either be shown or echoed briefly.
| Parameters | |
|---|---|
context |
Context: This value cannot be null. |
shouldShowTouchInput
static fun shouldShowTouchInput(context: Context): Boolean
Returns true when characters entered into a password, pin or other secret field from touch/virtual input sources should either be shown or echoed briefly.
| Parameters | |
|---|---|
context |
Context: This value cannot be null. |