Change hamburger icon color programatically AppCompat

BjornBBjornB USMember ✭✭✭

Is this possible?

Best Answer

  • BjornBBjornB US ✭✭✭
    edited February 2017 Accepted Answer

    Thanks for your answer @yousufctec

    but im not going to create 16 million different colored icons ;)
    The hamburger icon in appcompat is not something you control as "your own image file" since it doesnt use a resource that i myself include in my project.

    I ended up creating an awesome solution for this problem! Adding a colorfilter in a customrenderer to the existing drawable, this also colors the backbutton in android, aaand it colors your toolbaricons aswell (if tou want to). I will post the code here as soon as i have created a publicly acceptable renderer :)

Answers

  • yousufctecyousufctec USMember ✭✭✭

    Hi @BjornB ,
    Are you referring to the Master Detail Page hamburger? If so, then you need to have multiple images for the hamburger icons and you can change the master page icons everytime from the code behind.

    Thanks!

    Yousuf.

  • BjornBBjornB USMember ✭✭✭
    edited February 2017 Accepted Answer

    Thanks for your answer @yousufctec

    but im not going to create 16 million different colored icons ;)
    The hamburger icon in appcompat is not something you control as "your own image file" since it doesnt use a resource that i myself include in my project.

    I ended up creating an awesome solution for this problem! Adding a colorfilter in a customrenderer to the existing drawable, this also colors the backbutton in android, aaand it colors your toolbaricons aswell (if tou want to). I will post the code here as soon as i have created a publicly acceptable renderer :)

  • BillyMartinBillyMartin USMember ✭✭✭

    @BjornB Do you have the code yet?

Sign In or Register to comment.