Search code examples
androidmaterialdrawer

Change textsize of Drawer item android


Hi I am using this MaterialDrawer and I want to change the text size of the drawer item.

There is no api method to change the text size as given in this issue.

He has said to overwrite the dimens.xml and change like below in this issue

<!-- Override the default value 14sp if you want do it!-->
    <dimen name="material_drawer_item_primary_text">16sp</dimen>

I added this library to my project using build.gradle

compile('com.mikepenz:materialdrawer:3.1.2@aar') {
    transitive = true
}

And now unable to find the dimens.xml and change that text size. How can I achieve it. Please help. Thanks in advance.


Solution

  • You need to override the text size in your app's dimens.xml

    Add dimens.xml in res->values folder with
    <dimen name="material_drawer_item_primary_text">16sp</dimen> in it.