How to change navigation drawer font?

前端 未结 6 2012
别那么骄傲
别那么骄傲 2020-12-13 19:51

I want to use my own font for navigation drawer in android.I use the library comes with android studio according to this answer: https://stackoverflow.com/a/23632492/4393226

6条回答
  •  离开以前
    2020-12-13 20:25

    It Works For Fonts Only

    1. First Of All Add color of your font (if you want to change) in colors.xml file located at res->values->colors.xml like

      #000000 // it's for black don't go for white color
      
    2. Then edit style.xml file located at same values directory (there are two files edit that file which having your theme with style name="your_theme" or find line in that two file

    3. Here we have to set font property. So you have to create new style tag in enclosing resource tags. in my case I create

      
      

      Note that Name given for this tag is MyText. Now we have to use this name in aboved first style block whose name is your appication theme.

    4. Mentioned this new style in above appication theme style tag. In my case its like

      
          
      

提交回复
热议问题