1.首先要引入design和appcompat-v7兼容包 2.在布局里写TextInputLayout 3.里面写EditText 4.控制TextInputLayout的颜色在style.xml 中colorAccent中指定