How to change color of Toolbar back button in Android?

后端 未结 17 1163
不知归路
不知归路 2020-12-04 06:51

I could not change the color of back button. I am using toolbar material design. In my app I am applying black background of tool bar but the back design is being black by d

17条回答
  •  天涯浪人
    2020-12-04 07:41

    You don't have to change style for it. After setting up your toolbar as actionbar, You can code like this

    android.getSupportActionBar().setDisplayHomeAsUpEnabled(true);
    android.getSupportActionBar().setHomeAsUpIndicator(R.drawable.back);
    //here back is your drawable image
    

    But You cannot change color of back arrow by this method

提交回复
热议问题