首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在TextInputLayout android中使用“TextInputLayout”时不可显示的绘图

在TextInputLayout android中使用“TextInputLayout”时不可显示的绘图
EN

Stack Overflow用户
提问于 2017-04-12 10:30:31
回答 1查看 597关注 0票数 1

当我将app:passwordToggleEnabled="true"用于TextInputLayout时,左边的绘图就不再显示了。以下是我的xml代码:

代码语言:javascript
复制
<android.support.design.widget.TextInputLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            app:passwordToggleEnabled="true">

            <android.support.design.widget.TextInputEditText
                android:id="@+id/password"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:hint="Password"
                android:drawableLeft="@drawable/ic_lock_black_24dp"
                android:drawablePadding="10dp"
                android:inputType="textPassword"
                android:singleLine="true" />
        </android.support.design.widget.TextInputLayout>

(这只是发生在buildTool版本25.0.2中)

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2017-04-12 10:45:52

使用android:drawableStart="@drawable/ic_lock_black_24dp"代替

代码语言:javascript
复制
android:drawableLeft="@drawable/ic_lock_black_24dp"
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/43367039

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档