Changing the Font for Android TextViews and EditTexts

Easy Font Modifications to Get Different Text Styles in Android

Setting a new font when developing an Android App puts your own style onto the user interface (UI) and can help it stand out from the crowd. For many Activity screens the interface is usually constructed using Android layouts and interface widgets. The interface widgets, such as CheckBoxes and TextViews, have various properties that can be easily modified to change their look. Changing properties is done via the Properties list when viewing an Activity in the Graphical Layout screen in Eclipse, by editing the layout XML directly, or finally by using code to set property values.

This article mainly covers changing the look of a widget’s font using the Properties list. You can follow this article as a tutorial by starting a new Android Application Project in Eclipse and playing with widget properties as we go. (See our article Your First Android Java Program if you do not now how to create a basic App project. Here we have called the new App and project Android Fonts and given the package name biz.tekeye.fonts but you will be using you own package name.)

Edit Text Properties with the Android Development Tools Graphical Layout

Drag and drop a medium Android TextViewWith the activity_main.xml layout open and the Graphical Layout shown (click the tab at the bottom of the edit area if required) drag and drop some Medium TextViews onto the first activity’s screen. Click on the Form Widgets tab if needed to find the TextViews. With a TextView selected its properties can be changed in the Outline pane. If the Outline pane is not visible use the Eclipse Window and Show View menu option to select Outline to display it. Continue reading