SuperEditText-清除按钮及密码切换
<h4>带清除按钮及密码切换的EditText</h4>
<pre><code> <com.hongshi.uilibrary.view.SuperEditText
style="@style/clear_edit_text_style"
android:layout_marginTop="16dp"
android:hint="请输入用户名"
android:inputType="number"
android:maxLength="11"
android:textColorHint="@color/gray_666"
android:textSize="17sp"
app:leftDrawableWidth="10dp"//左侧图标匡宽高 不设置默认使用图标的宽高
app:rightDrawableWidth="20dp"//右侧图标匡宽高 不设置默认使用图标的宽高
app:clearDrawable="@mipmap/img_clear" //清除按钮
app:leftDrawable="@mipmap/login_num"//左侧图标
app:pwdHintDrawable="@mipmap/password_off"//密码Hint图标
app:pwdShowDrawable="@mipmap/password_on"//密码显示图标
app:rightDrawableType="CLEAR" />//输入框右侧图标事件类型</code></pre>
<h4>使用:</h4>
<ol>
<li>密码输入框:
app:pwdHintDrawable="@mipmap/password_off"//密码Hint图标
app:pwdShowDrawable="@mipmap/password_on"//密码显示图标
app:rightDrawableType="PWD"
app:leftDrawable="@mipmap/login_num"//左侧图标 根据实际UI图添加
2.清除输入框
app:clearDrawable="@mipmap/img_clear" //清除按钮
app:leftDrawable="@mipmap/login_num"//左侧图标 根据实际UI图添加</li>
</ol>
<p><img src="https://www.showdoc.cc/server/api/common/visitfile/sign/82a52f36e2d2e989ab1ef5a302394b9a?showdoc=.jpg" alt="" />
<img src="https://www.showdoc.cc/server/api/common/visitfile/sign/2b00ba43b31a5ff986efc7651e72bd62?showdoc=.jpg" alt="" /></p>
<p><img src="https://www.showdoc.cc/server/api/common/visitfile/sign/3ddab9185064b27bff91f226546710fa?showdoc=.jpg" alt="" />
<img src="https://www.showdoc.cc/server/api/common/visitfile/sign/b69ff48491a745b252f956625b63c867?showdoc=.jpg" alt="" /></p>