TextInputLayout的使用
2016-07-21 本文已影响158人
苏简笔记
原文链接:Android 5.0新控件——TextInputLayout
先看效果图:

简要描述使用方法:
TextInputLayout其实是一个容器,他继承自LinearLayout,该容器是作用于TextView的,TextInputLayout只能包裹一个子节点,类似于ScrollView。
1-首先添加依赖
compile 'com.android.support:design:23.0.1'
2-使用方法

如此便可完成TextInputLayout的使用了。
3-设置动画的开关

4-显示错误信息

5-设置Hint移动到上方的颜色

6-设置字体颜色
直接设置对应的TextView的TextColor
7-设置下划线的颜色

8-设置文字计数器


9-提示错误

