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.
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.
1) Create a new resource directory: right-click the res folder and go to New -> Android resource directory. 2) Set name of resource directory as font. 3) In the Resource type list, select font, and then click OK. 4) Add your custom font(e.g. my_font.
If your phone doesn't come with built-in support for changing fonts and you don't want to root it, you can use a third-party launcher like Nova to change fonts. Unlike the built-in tools that change the font system-wide, launchers can only change the font for the launcher elements, not the full system.
Changing Built-In Font Settings You can also access your “Settings” menu from the app drawer. In the “Settings” menu, scroll down and tap the “Display” option. The “Display” menu may vary depending on your Android device. Tap “Font Size and Style” if you're a Samsung device owner.
editText.setTypeface(Typeface.SERIF);
As like as for TextView.
<TextView ... android:typeface="serif" ... />
Edit: Above is the XML
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With