Ich habe ein TextInputEditText
in Verbindung mit TextInputLayout
mit android:inputType="textPassword"
app:passwordToggleEnabled="true"
mit Passwort Toggle-Button in den TextInputEditText
wie die nächsten Bild zeigen:
Das Problem ist Sobald ich die Passwort-Umschalttaste drücke, verschwindet es für immer.
Es funktionierte gut in com.android.support:design:24.2.0
Version.
Passwort Umschaltknopf auf TextInputEditText verschwindet nach Klick in Support Library 25.1.0
vermisse ich etwas Neues? es ist ein Fehler?
Some gradle Projekt Setup:
minSdkVersion 17
targetSdkVersion 25
Kompilierung 'com.android.support:support-v4:25.1.0'
Kompilierung ‚com.android.support:appcompat-v7:25.1 0,0'
Kompilierung 'com.android.support:cardview-v7:25.1.0'
Kompilierung 'com.android.support:design:25.1.0'
Rennen in 2 verschiedenen Android 6.0 (Eibisch) Geräte.
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>
Wenn ich app:passwordToggleDrawable
mit einem benutzerdefinierten ziehbar in TextInputLayout
verwenden Sie es nicht verschwindet.
Der verwandte Stil:
<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>
I habe den gleichen Code ausprobiert und es funktioniert. Bitte überprüfen Sie das einmal verwendete Thema . –
@AndroidGeek Ich habe versucht, ohne 'android: theme =" @ style/TextLabelGray "' und was ich fand, ist die Schaltfläche nicht verschwindet, wurde es nur transparent, weil ich immer noch drücken kann und habe das Ausblenden/Einblenden Passwort Verhalten. Versucht mit einem schwarzen Hintergrund, aber immer noch das gleiche Ergebnis. Irgendeine Idee? – MiguelHincapieC
Abspielen mit 'TextInputLayout' Ich habe Folgendes gefunden: Wenn ich ein benutzerdefiniertes Zeichen in 'app: passwordToggleDrawable' mit' app: passwordToggleContentDescription' verwende, verschwindet die Schaltfläche nicht – MiguelHincapieC