How to customize the back button on ActionBar

后端 未结 9 1268
抹茶落季
抹茶落季 2020-11-22 17:12

I have been able to customize the action bar\'s background, logo image and text color using suggestions from these:
Android: How to change the ActionBar "Home"

9条回答
  •  甜味超标
    2020-11-22 17:38

    So you can change it programmatically easily by using homeAsUpIndicator() function that added in android API level 18 and upper.

    ActionBar().setHomeAsUpIndicator(R.drawable.ic_yourindicator);

    If you use support library

    getSupportActionBar().setHomeAsUpIndicator(R.drawable.ic_yourindicator);

提交回复
热议问题