How do I change the color of actionbar's up arrow?

前端 未结 3 876
攒了一身酷
攒了一身酷 2020-12-15 06:18

How do I change the actionbar\'s up arrow. I am using the action bar in android not ABS or actionbarcompat. Is there a way to change the color /image of the action bar\'s up

3条回答
  •  醉梦人生
    2020-12-15 06:56

    the actionbar's up arrow is an image. you can change it by download a new one and replace it:

    1. download new image,best is to download it from google material design icon page.download it in black or white in png format.save it somewhere you can find it easily.a good choice for download is the "navigate_before" icon .

    2. insert the image to the studio: file->new->image asset. rename the image to your preffered name ( ic_back for example).

    3. connect the up arrow button to the new image: inside the values/styles.xml file add the item tag like that:

       
      

      I put the image asset inside the mipmap folder so I wrote "@mipmap" plus "/" and then the image name (mine was ic_navigate_before). hope it helped!

提交回复
热议问题