Open In App
Related Articles

How to Change the Text Font of Side Navigation Drawer Items in Android?

Like Article
Save Article
Report issue

The navigation drawer is the most common feature offered by android and the navigation drawer is a UI panel that shows your app’s main navigation menu. It is also one of the important UI elements, which provides actions preferable to the users like example changing user profile, changing settings of the application, etc. The user can view the navigation drawer when the user swipes a finger from the left edge of the activity. They can also find it from the home activity by tapping the app icon in the action bar. The drawer icon is displayed on all top-level destinations that use a DrawerLayout. Have a look at the following image to get an idea about the Navigation drawer.

Navigation Drawer

In this article, we will see how we change the text font of the navigation drawer’s item. Before starting we need to create a project with Side Navigation Drawer. 

  • Method 1: Create a new project from the file option in the left corner. Go to the File > New > New Project and Select the Navigation Drawer Activity option and enter the project name. Let the remaining things be as it is.
  • Method 2: You can create a side navigation drawer manually. To do so click here Navigation Drawer in Android.

Step by Step Implementation

Step 1: Go to the app > res > values > themes > themes.xml file and write down the flowing code inside the <resources> tag.


<!--new style is created here-->
<style name="NewFontStyle" parent="android:Widget.TextView">
  <item name="android:fontFamily">sans-serif-smallcaps</item>


Step 2: Open activity_main.xml file and go to NavigationView tag and set the style in itemTextAppearance attribute. 


Below is the complete code for the activity_main.xml file.


<?xml version="1.0" encoding="utf-8"?>
        android:layout_height="match_parent" />
        app:menu="@menu/activity_main_drawer" />


Output UI:



Last Updated : 06 Jan, 2021
Like Article
Save Article
Share your thoughts in the comments
Similar Reads