The password toggle button in TextInputEditText disappears after clicking in Support Library 25.1.0

I have a TextInputEditText combined with a TextInputLayout with android:inputType="textPassword" using app:passwordToggleEnabled="true" to show the password toggle button in TextInputEditText as the following image:

password switch example
The problem is , when I click the password toggle button, it disappears forever.
It worked well in the com.android.support:design:24.2.0 version.

Am I missing something new? this is mistake?

Some gradle project settings:
minSdkVersion 17
targetSdkVersion 25
compile 'com.android.support:support-v4:25.1.0'
compile 'com.android.support:appcompat-v7:25.1.0'
compile 'com.android.support:cardview-v7:25.1.0'
compile 'com.android.support:design:25.1.0'

Works on two different Android 6.0 devices (Marshmallow).

XML:

 <android.support.design.widget.TextInputLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:theme="@style/TextLabelGray" app:passwordToggleEnabled="true"> <android.support.design.widget.TextInputEditText android:id="@+id/profile_field_password" android:layout_width="match_parent" android:layout_height="wrap_content" android:hint="@string/perfil_field_password" android:inputType="textPassword" android:maxLines="1" android:maxLength="100" android:imeOptions="actionNext" android:imeActionLabel="@string/perfil_field_tipo_documento" android:textColor="@color/colorAccent" android:textSize="@dimen/perfil_text_view_text_size" android:paddingStart="15dp" android:paddingEnd="5dp"/> </android.support.design.widget.TextInputLayout> 

If I use app:passwordToggleDrawable with a custom user in TextInputLayout , it does not disappear.

Related Style:

 <style name="TextLabelGray" parent="TextAppearance.AppCompat"> <!--//hint color And Label Color in False State--> <item name="android:textColorHint">@color/gray_text_color</item> <item name="android:textColorHighlight">@color/gray_text_color</item> <item name="android:textColorLink">@color/gray_text_color</item> <item name="colorAccent">@color/gray_text_color</item> <item name="colorControlNormal">@color/gray_text_color</item> <item name="colorControlActivated">@color/gray_text_color</item> </style> <!-- Base application theme. --> <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar"> <!-- Customize your theme here. --> <item name="colorPrimary">@color/colorPrimary</item> <item name="colorPrimaryDark">@color/colorPrimaryDark</item> <item name="colorAccent">@color/colorAccent</item> <item name="colorControlNormal">@color/colorControlNormal</item> <item name="searchViewStyle">@style/AppTheme.MySearchViewStyle</item> </style> 
+6
source share
1 answer

change the gradle file to the following dependency

 compile 'com.android.support:appcompat-v7:25.3.1' compile 'com.android.support:design:25.3.1' compile 'com.android.support:support-v4:25.3.1' 

In the xml file, add the following lines for the toggle button in the password field

  <android.support.design.widget.TextInputLayout android:id="@+id/text_input_layout_password" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="10dp" app:passwordToggleEnabled="true"> <android.support.design.widget.TextInputEditText android:id="@+id/text_input_edit_text_password" android:layout_width="match_parent" android:layout_height="wrap_content" android:hint="Enter Password" android:imeActionId="@+id/login" android:imeActionLabel="Login" android:imeOptions="actionUnspecified" android:inputType="textPassword" android:maxLines="1" tools:text="password" /> </android.support.design.widget.TextInputLayout> 
+1
source

Source: https://habr.com/ru/post/1013715/


All Articles