Change the actionbar homeAsUpIndicator Programmatically

后端 未结 12 1604
甜味超标
甜味超标 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:40

    API 18 has new methods ActionBar.setHomeAsUpIndicator() - unfortunately these aren't supported in the support library at this moment

    http://developer.android.com/reference/android/app/ActionBar.html#setHomeAsUpIndicator(android.graphics.drawable.Drawable)

    edit: these are now supported by the support library http://developer.android.com/reference/android/support/v7/app/ActionBar.html#setHomeAsUpIndicator(android.graphics.drawable.Drawable)

提交回复
热议问题