Chrome Custom Tabs change the default close button not working

前端 未结 7 577
清歌不尽
清歌不尽 2021-01-17 11:30

I am trying to change the default close button on the actionbar of the custom chrome tabs. I have tried to set using setCloseButtonIcon() However, the default c

相关标签:
7条回答
  • 2021-01-17 12:14

    Presuming you are using the Google library and not on of the related ones the icons size should be 24dp as documented here.

    This can be achieved with BitmapFactory Options:

    BitmapFactory.Options options = new BitmapFactory.Options();
    options.outWidth = 24;
    options.outHeight = 24;
    options.inScaled = true; //already default, just for illustration - ie scale to screen density (dp)
    ... = BitmapFactory.decodeResource(getResources(), R.drawable.ic_arrow_back_black_48dp, opts);
    
    0 讨论(0)
提交回复
热议问题