Jay Jay - 1 year ago 140
Android Question

How can I change the NavigationView's item text size?

Google recently released the

widget as part of the
library, which greatly simplified (and standardises) the process of creating a NavigationDrawer.

However according to the design specs, the list item should be Roboto Medium, 14sp, 87% #000000. The
exposes no
to customise this.

Material design specs
Font style info

What are my options if I'm pedantic about maintaining the correct design specifications using the Google provided
(or customising it in any other way)?

Answer Source

Since Android Support Library 22.2.1, Google has changed default textSize of items in NavigationView from 16sp to 14sp, which suits Material Design guideline well. However, in some cases(for example, when you want to support Chinese language), it seems larger textSize is better. Solution is simple:

  1. add app:theme="@style/yourStyle.Drawer" to your NavigationView in your layout.xml
  2. in styles.xml, add android:textSize="16sp" in style yourStyle.Drawer
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download