Change toolbar back arrow color

前端 未结 3 758
独厮守ぢ
独厮守ぢ 2021-01-05 09:19

Hi. In the picture above you can see a back arrow and a (part of) title. I changed the title color using the attached .xml code. But I want to color the back arrow

3条回答
  •  忘掉有多难
    2021-01-05 09:40

    Be mindful of the theme you use. If you copied your ToolBar code from https://developer.android.com/training/appbar/setting-up, then you have this:

    
    

    Based on @Gabriele's answer (upvoted), I had to take out the android:theme="@style/ThemeOverlay.AppCompat.ActionBar" attribute and put it in styles.xml then customize the colorControlNormal attribute like so:

    
    

    Back to my Toolbar declaration, I modified as below:

    
    

    Cheers!

提交回复
热议问题