Reputation: 2733
I'm trying to change the back button icon in chrome custom tabs from the standard 'x' to a back arrow, '<'.
I know I can use the setCloseButtonIcon(Bitmap icon)
method while I'm building the intent to set a custom bitmap for the button.
But checking this issue: Close button should be shown instead of a back button on the toolbar of chrome custom tab, from the Chromium bug tracker I saw that it was fixed with this resolution:
The flag "android.support.CUSTOM_TABS:close_button_style" was added for the developers to customize the style of close button. The default setting is "X", and developers are granted with an option of "<".
The problem is that I can't find a way to use it while I'm building the custom tab. Does anyone know how I can change the style using this approach?
Upvotes: 0
Views: 1328
Reputation: 32810
The CLOSE_BUTTON_STYLE
was an old parameter and it was removed in this commit:
Let client app customize close button
There has been strong feedback requesting customizeable close button. This CL implements it by getting a bitmap from the passed intent.
BUG=513512
Review URL: https://codereview.chromium.org/1263583003
Cr-Commit-Position: refs/heads/master@{#340941}
As you can see it was removed from CustomTabIntentDataProvider.java
.
Now the only available option is to use the method setCloseButtonIcon(Bitmap icon)
that you already know.
Upvotes: 3