Android TextInputLayout密码切换开关在新的支持库中不可见 [英] Android TextInputLayout Password toggle not visible in new support library
问题描述
我已使用以下设计库进行编译,并且在 EditText
I have compiled with following design library and it is displaying password HIDE/SHOW button at the right of EditText
编译'com.android.support:design:24.2.1'
compile 'com.android.support:design:24.2.1'
<android.support.design.widget.TextInputLayout
android:id="@+id/login_password_text_input_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/spacing_normal">
<android.support.v7.widget.AppCompatEditText
android:id="@+id/login_password_edit_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:drawablePadding="@dimen/spacing_micro"
android:hint="@string/prompt_password"
android:imeActionId="@+id/login"
android:imeActionLabel="@string/action_sign_in_short"
android:imeOptions="actionUnspecified"
android:inputType="textPassword"
android:maxLines="1"
android:text="password" />
</android.support.design.widget.TextInputLayout>
喜欢:
更新至
编译'com.android.support:design:25.0.1'
compile 'com.android.support:design:25.0.1'
它不可见,为什么?有任何错误吗?
Its not visible, Why? Is there any bug?
请指导.
推荐答案
默认情况下,默认情况下已禁用 TextInputLayout
密码切换,以避免不必要地覆盖开发人员指定的最终可绘制对象.可以通过 passwordToggleEnabled
XML属性.
The TextInputLayout
password toggle is now disabled by default to avoid unnecessarily overwriting developer-specified end drawables. It may be manually enabled via the passwordToggleEnabled
XML attribute.
来自 https://developer.android.com/topic/libraries/support-library/versions.html
这篇关于Android TextInputLayout密码切换开关在新的支持库中不可见的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!