原创文章,转载请注明http://blog.csdn.net/leejizhou/article/details/50494634
TextInputLayout是一个父容器控件,包裹了EditText,也没什么特别的属性,使用很简单,切记它一定是和EditText一起搭配使用的。
TextInputLayout的常用方法
tl_password.setHint("Username");//EditText获得焦点后在上面显示的文字tl_password.setErrorEnabled(true);//开启错误提醒tl_password.setError("密码不能为空!");//错误提醒的文字tl_password.setErrorEnabled(false);//关闭错误提醒
--------------ToolBar------------------
<android.support.v7.widget.Toolbar
android:id="@+id/id_toolbar"
app:title="App Title"
app:subtitle="Sub Title"
app:navigationIcon="@drawable/ic_toc_white_24dp"
android:layout_height="wrap_content"
android:minHeight="?attr/actionBarSize"
android:layout_width="match_parent"
android:background="?attr/colorPrimary"/>
0................................................rippledrabw http://www.jianshu.com/p/ab2e9a58c119
很简单,就是在 drawable 文件夹中定义一个以为根控件的 xml 文件,然后作为一个控件的背景即可。 定义 ripple_blue.xml :
<?xml version="1.0" encoding="utf-8"?>
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
android:color="#0000cc">
</ripple>
1...........................................................