I am using Material design (1.2.0-rc01) in my Android project.
implementation 'com.google.android.material:material:1.2.0-rc01'
I need it to be visible logically for example if TextView error icon is there or TextView is blank or empty, it must be invisible, while when text entered it should be visible.
To achieve this I used
passwordlayout.endIconMode = TextInputLayout.END_ICON_NONE
and then
passwordlayout.endIconMode = TextInputLayout.END_ICON_PASSWORD_TOGGLE
The first default one is working well, but when it was set programatically icon of password toogle appeard with no effect when tapped. Is it a bug or am I missing something in my logic.
How to appear and disappear password toggle on EditText programmatically?