TextInputLayout :How to give padding or margin to hint?

后端 未结 15 1872
离开以前
离开以前 2020-11-28 06:42

I have to use TextInputLayout of design support library in my project. I want to give space between hint and EditText in TextInp

15条回答
  •  再見小時候
    2020-11-28 07:41

    I tried the padding changes, but it doesn't work well.

    A simple workaround is to change the height of the TIL:

    android:layout_height="wrap_content"
    

    to (e.g.)

    android:layout_height="50dp"
    

    it might not give the same result on all screen sizes.

    And add

    android:gravity="bottom" 
    

    to push your text down.

提交回复
热议问题