Difference between TextInputLayout and TextInputEditText

前端 未结 3 406
北海茫月
北海茫月 2020-12-29 02:53

Need to know what actually difference between TextInputEditText and TextInputLayout, When should we use one of them.

3条回答
  •  醉梦人生
    2020-12-29 03:22

    Both TextInputLayout and TextInputEditTextare different. As mentioned in the documentation Here the TextInputLayout and TextInputEditText are meant to be used like the below example(From official doc)

    
    
    
    
    
    

    Also the main difference is when you compare TextInputEditText with EditText. The TextInputEditText provides a hint when when the layout is viewed in landscape mode. This is explained clearly in depth by TWiStErRob. I hope this answers the question. Thank you.

提交回复
热议问题