question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[TextInputLayout] Show/Hide Password Icons are Mixed Up

See original GitHub issue

Description:

I am using:

<com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputEditText />
</com.google.android.material.textfield.TextInputLayout>

with <item name="passwordToggleEnabled">true</item>

To create the UI for a Password entry with a show/hide password toggle. The behavior matches the specs from the Material Guidelines shown here. However, these feel entirely counter-intuitive AND Google’s own behavior for other apps does not match this.

Current Behavior component_show_password component_hide_password

Expected Behavior (and Google’s own behavior) hide_password show_password

Android API version: All versions

Material Library version: 1.2.0-alpha05

Device: All devices

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:3
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
hunterstichcommented, Apr 3, 2020

Thanks for filing this @zkovar. I’m bringing this up with design to see what they have to say.

1reaction
sinnavjcommented, Jan 8, 2021

<com.google.android.material.textfield.TextInputLayout app:passwordToggleEnabled="true" // It works in all api versions 1.2.0 to 1.3.0-beta01 app:endIconMode="password_toggle". // it's still behaving in opposite order>

And in the docs it’s written that

<attr format="boolean" name="passwordToggleEnabled"/>

so is there any update on it when it’s going to be fixed Thanks

Read more comments on GitHub >

github_iconTop Results From Across the Web

Change to custom icon from eye-icon(default) for hide-show ...
I want to change/display different icons for show password in android edittext. I am using following code to display icon. ... I want...
Read more >
EditText Password with Show and Hide icon - YouTube
In this tutorial I show you how to add the toggle on the password EditText to give the option to hide and show...
Read more >
Material Ui Show Hide Component at Laurie Meadows blog
[TextInputLayout] Show/Hide Password Icons are Mixed Up · Issue 1171 image credit : github.com. Material Ui Show Hide Component - It is a...
Read more >
How to Toggle Password Visibility in Android? - GeeksforGeeks
So In this article, we would be seeing how to change the password visibility by pressing a single button (here it would be...
Read more >
Is Google using the password show/hide toggle icon on their ...
In this particular case, since the icon represents a physical object -- an eye, that is either open or "closed" (crossed out) --...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found