change font for editText hint

后端 未结 10 2375
野趣味
野趣味 2020-12-03 13:17

Is it possible to change the font for the hint displayed in the EditText field? I want to set the font in the xml itself.

10条回答
  •  一整个雨季
    2020-12-03 14:15

    Take the approach of using a text input layout and placing a text input edit text inside

     
    
       
    
     
    

    On the Fragment/Activity , Set the font you want for the hint onto the TextInputLayout(text_input_layout_Til) Then set the font on the edit text(editText) as well / If you do this , The text the user will input and the hint will have different fonts

提交回复
热议问题