Change background of EditText's error message

前端 未结 4 840
情歌与酒
情歌与酒 2020-12-02 14:21

What I want to do is change the background color (set custom drawable) of a popup error message displayed after using setError() method.

Currently, it l

4条回答
  •  伪装坚强ぢ
    2020-12-02 14:57

    you will need to include these dependancies:

    compile 'com.android.support:appcompat-v7:23.1.1'
    compile 'com.android.support:design:23.1.1'
    

    and here is a sample on how to use it:

    
    
            
    
    
    

    This will give you the Material Design you are looking for to give form validation as well as a nice animation effect for the label.

提交回复
热议问题