How to change home as up resource programmatically?

前端 未结 6 1634
迷失自我
迷失自我 2020-12-25 15:02

I know how to change the homeAsUpIndicator in the styles xml file. The question is how to change it programmatically.

The reason I want to do it bec

6条回答
  •  有刺的猬
    2020-12-25 15:19

    This worked for me

    getSupportActionBar().setHomeAsUpIndicator(R.drawable.my_home_as_up)
    

提交回复
热议问题