Changing the Action bar icon

前端 未结 7 1585
栀梦
栀梦 2020-12-10 15:44

I\'m currently implementing theme support for my application and a part of it is changing the action bar app icon. I want to use a dark icon when Holo Light is selected. Eve

7条回答
  •  难免孤独
    2020-12-10 16:42

    Try this

        setSupportActionBar(toolbar);
        if (getSupportActionBar() != null)
        getSupportActionBar().setIcon(R.drawable.your_icon);
    

提交回复
热议问题