android - Changing the item text size in navigation view -
i creating navigation drawer in android , have added items in menu_main.xml not able change size of menu items. below code menu_main.xml:
<menu xmlns:android="http://schemas.android.com/apk/res/android"> <group android:checkablebehavior="single"> <item android:id="@+id/motel" android:title="motel"> </item> <item android:id="@+id/packages" android:title="packages"> </item> </group> </menu>
create style , apply navigationview using app:theme
<style name="navigationviewstyle"> <item name="android:textsize">20sp</item> <!-- menu item text size--> <item name="android:listpreferreditemheightsmall">40dp</item><!-- menu item height--> </style>
and said, apply style navigationview using app:theme
<android.support.design.widget.navigationview ... ... app:theme="@style/navigationviewstyle" ... ... </android.support.design.widget.navigationview>
Comments
Post a Comment