[TIMOB-27531] Android: TextField - add password visibility toggle API
| GitHub Issue | n/a |
|---|---|
| Type | Improvement |
| Priority | n/a |
| Status | Open |
| Resolution | Unresolved |
| Affected Version/s | n/a |
| Fix Version/s | n/a |
| Components | n/a |
| Labels | n/a |
| Reporter | Sergey Volkov |
| Assignee | Eric Merriman |
| Created | 2019-09-25T11:50:21.000+0000 |
| Updated | 2021-04-11T10:22:56.000+0000 |
Description
Patch for the SDK: [^0001-feat-android-add-passwordToggle-properties-to-textVi.patch]
Sample application code: [^app.js]
Related platform methods documentation:
[setPasswordVisibilityToggleEnabled](https://developer.android.com/reference/android/support/design/widget/TextInputLayout#setpasswordvisibilitytoggleenabled)
[setPasswordVisibilityToggleTintList](https://developer.android.com/reference/android/support/design/widget/TextInputLayout#setpasswordvisibilitytoggletintlist)
- name: passwordVisibilityToggleColor
summary: Color of password visibility toggle
description: |
Color applied to password visibility toggle when field's input is not visible.
This property only works when <Titanium.UI.TextField.passwordVisibilityToggleEnabled> is set true.
type: String
default: value of <Titanium.UI.TextField.hintTextColor> property
since: {android: "8.3.0"}
platforms: [android]
- name: passwordVisibilityToggleEnabled
summary: Determines whether the password visibility toggle functionality is enabled or not
description: |
When enabled, a button is placed at the end of the TextField which enables the user to switch
between the field's input being visibly disguised or not.
This property only works when <Titanium.UI.TextField.passwordMask> is set true.
type: boolean
default: false
since: {android: "8.3.0"}
platforms: [android]
- name: passwordVisibilityToggleTintColor
summary: Tint color of password visibility toggle
description: |
Color applied to password visibility toggle when field's input is visible.
This property only works when <Titanium.UI.TextField.passwordVisibilityToggleEnabled> is set true.
type: String
default: value of <Titanium.UI.TextField.color> property
since: {android: "8.3.0"}
platforms: [android]
Attachments
| File | Date | Size |
|---|---|---|
| 0001-feat-android-add-passwordToggle-properties-to-textVi.patch | 2019-09-25T11:45:53.000+0000 | 7832 |
| app.js | 2019-09-25T11:37:35.000+0000 | 2038 |
| pwd_toggle.gif | 2019-09-25T11:36:42.000+0000 | 1074955 |
Awesome! I've made a PR so it won't get lost here: https://github.com/appcelerator/titanium_mobile/pull/12712