Change font for EditText in Android?

前端 未结 8 940
梦谈多话
梦谈多话 2020-12-10 10:17

Is there any way to change the font for a EditText in Android? I want it to match the font\'s I set for all my textViews.

8条回答
  •  -上瘾入骨i
    2020-12-10 10:54

    You can create font folder under res directory in last version Android studio 3 .Then copy and past it you'r font to font folder. Now just add fontFamily to EditText tag xml.

    like below.

            
    

    We use android:fontFamily="@font/ritaric" for apply font on EditText.

提交回复
热议问题