Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change font for EditText in Android?

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.

like image 680
William L. Avatar asked May 26 '12 14:05

William L.


People also ask

How do I change the font in edit text?

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.

How do you change the font hint on Android?

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.

How can I change my font without root?

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.

How do I change the font style on my phone?

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.


1 Answers

 editText.setTypeface(Typeface.SERIF);  

As like as for TextView.

 <TextView   ...      android:typeface="serif"   ... /> 

Edit: Above is the XML

like image 147
Samir Mangroliya Avatar answered Oct 05 '22 20:10

Samir Mangroliya