How to make edit text error position in android?

前端 未结 2 1656
傲寒
傲寒 2021-01-06 22:01

I have an app in which I have edit text fields in which I have to enter a mobile number and password. The problem is that the EditText error indicator covers th

2条回答
  •  爱一瞬间的悲伤
    2021-01-06 22:31

    Use this android.support.design.widget.TextInputLayout. which can show the error below to the Edittext.so You can easily write next thing like your number and password in the new Edittext.

    Here is xml code :

    
    
            
    
                
            
    
            
    
                
            
    
            
    
                
            
    
    

    Let's see the ScreenShot for understand.

    Empty Edittext.

    Error message Edittext.

提交回复
热议问题