Change the actionbar homeAsUpIndicator Programmatically

后端 未结 12 1637
甜味超标
甜味超标 2020-12-09 23:08

I used the following hack to change the homeAsupIndicator programmatically.

int upId = Resources.getSystem().getIdentifier(\"up\", \"id\", \"android\");
if (         


        
12条回答
  •  没有蜡笔的小新
    2020-12-09 23:22

    You can achieve this in an easier way. Try to can change the homeAsUpIndicator attribute of actionBarStyle in your theme.xml and styles.xml.

    If you want some padding, just add some white space in your image.

提交回复
热议问题