I try to change default icon for Close Button in Chrome custom tabs (CustomTabsIntent.Builder)
Simple code for testing:
Bitmap closeIcon = BitmapFact
The close icon needs to be 24dp x 24dp. Something like this:
In Kotlin, you can retrieve this drawable and add it to your builder like this:
AppCompatResources.getDrawable(main, R.drawable.close_icon)?.let {
DrawableCompat.setTint(it, Color.WHITE)
builder.setCloseButtonIcon(it.toBitmap())
}
This answer has some more details.