How to change the color of the icon in drawable layout on android

Asked

Viewed 979 times

3

Hello, I need to change the color of the icon q triggers the Drawablelayout menu, but I can’t find the property or where I can customize this icon.

How do I change the color of that icon? Where do I put his color? What element? What file name?

inserir a descrição da imagem aqui

1 answer

4


To change the color of the burger icon you should open the file xml style.

And then in this class, add the line responsible for the color:

<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
    <item name="windowNoTitle">true</item>
    <item name="windowActionBar">false</item>
    <item name="colorPrimary">@color/colorPrimary</item>
    <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
    <item name="colorAccent">@color/colorAccent</item>
    /*linha responsável pela cor abaixo*/
        <item name="drawerArrowStyle">@style/DrawerArrowStyle</item>
    /*linha responsável pela cor acima*/
</style>

<style name="DrawerArrowStyle" parent="@style/Widget.AppCompat.DrawerArrowToggle">
    <item name="spinBars">true</item>
    <item name="color">@android:color/black</item>
</style>

Then just change the color on the line <item name="color">@android:color/black</item>


Responding to Woton Sampaio:

The scheme is the same, but to change the color of the 3 dots, you must add the following line:

<item name="android:textColorSecondary">@color/white</item>

Any questions with the implementation let us know.

Hugs

  • Dude, I’m not the owner of the n kkkk question, but you know how to change the 3 dots on the menu too?

  • If you could put it next to your answer, thank you

  • I already left my +1

  • 1

    Woton Sampaio, I made an edit in my reply with the change you need to change the color of the 3 dots

  • Thank you very much, vlw

  • Solved! Thank you

Show 1 more comment

Browser other questions tagged

You are not signed in. Login or sign up in order to post.