Chrome 个自定义选项卡中的关闭按钮样式
Close button style in Chrome custom tabs
我正在尝试将 chrome 自定义选项卡中的后退按钮图标从标准“x”更改为后退箭头“” <'.
我知道我可以在构建意图时使用 setCloseButtonIcon(Bitmap icon)
方法来为按钮设置自定义位图。
但是检查这个问题:Close button should be shown instead of a back button on the toolbar of chrome custom tab,从 Chromium bug 跟踪器我看到它已经用这个解决方案修复了:
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 "<".
问题是我在构建自定义选项卡时找不到使用它的方法。
有谁知道我如何使用这种方法更改样式?
CLOSE_BUTTON_STYLE
是一个旧参数,在 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}
如您所见,它是 CustomTabIntentDataProvider.java
的 removed。
现在唯一可用的选择是使用您已经知道的方法setCloseButtonIcon(Bitmap icon)
。
我正在尝试将 chrome 自定义选项卡中的后退按钮图标从标准“x”更改为后退箭头“” <'.
我知道我可以在构建意图时使用 setCloseButtonIcon(Bitmap icon)
方法来为按钮设置自定义位图。
但是检查这个问题:Close button should be shown instead of a back button on the toolbar of chrome custom tab,从 Chromium bug 跟踪器我看到它已经用这个解决方案修复了:
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 "<".
问题是我在构建自定义选项卡时找不到使用它的方法。 有谁知道我如何使用这种方法更改样式?
CLOSE_BUTTON_STYLE
是一个旧参数,在 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}
如您所见,它是 CustomTabIntentDataProvider.java
的 removed。
现在唯一可用的选择是使用您已经知道的方法setCloseButtonIcon(Bitmap icon)
。