Change font of the floating label EditText and TextInputLayout

前端 未结 12 1041
北海茫月
北海茫月 2020-12-03 01:23

Someone tried to change the font of the floating label? I changed the source of EditText but the font of the floating label did not change, I am very grateful to those who h

12条回答
  •  北海茫月
    2020-12-03 01:36

    As of Design Library v23, you can use TextInputLayout#setTypeface().

    This will set the typeface on both the expanded and floating hint.

    Here is the feature request where it was discussed on b.android.com.

    EDIT: The error view typeface was not being set, but is now fixed in v25.1.0.

提交回复
热议问题