我一直在尝试探索Google Chrome 自定义标签工具,但有些东西让我很感兴趣。
在 Android Studio 上使用以下版本的库
compile 'com.android.support:customtabs:23.2.0'
然后使用 运行示例CustomTabsIntent
没有按我预期的那样工作。
CustomTabsIntent customTabsIntent = new CustomTabsIntent.Builder(customTabActivityHelper.getSession())
.setCloseButtonIcon(BitmapFactory.decodeResource(getContext().getResources(), R.drawable.ic_action_back))
.setToolbarColor(Color.RED)
.addDefaultShareMenuItem()
.build();
CustomTabActivityHelper.openCustomTab(getActivity(), customTabsIntent, Uri.parse(url), null);
使用它,只有在setToolbarColor()
工作。,甚至其他指令都没有生效setCloseButtonIcon()
。 addDefaultShareMenuItem()
有没有人经历过这样的事情?