chrome-custom-tabs

Can't change Chrome Custom Tabs navigation bar color when running in the Android Emulator

≯℡__Kan透↙ 提交于 2021-02-10 09:46:18
问题 Specifying colors for Chrome Custom Tabs seems a bit wonky. There are three colors you can specify: the toolbar color, "secondary toolbar" color, and navigation bar color. There seem to be two methods to controlling these. One is to set the three properties directly in the Builder, like so: val builder = CustomTabsIntent.Builder() builder.setToolbarColor(ContextCompat.getColor(context, R.color.colorPrimary)) builder.setSecondaryToolbarColor(ContextCompat.getColor(context, R.color

Can't change Chrome Custom Tabs navigation bar color when running in the Android Emulator

微笑、不失礼 提交于 2021-02-10 09:45:17
问题 Specifying colors for Chrome Custom Tabs seems a bit wonky. There are three colors you can specify: the toolbar color, "secondary toolbar" color, and navigation bar color. There seem to be two methods to controlling these. One is to set the three properties directly in the Builder, like so: val builder = CustomTabsIntent.Builder() builder.setToolbarColor(ContextCompat.getColor(context, R.color.colorPrimary)) builder.setSecondaryToolbarColor(ContextCompat.getColor(context, R.color

Android - “setToolbarColor(int)” and “setSecondaryToolbarColor(int)” is deprecated

流过昼夜 提交于 2021-02-09 10:43:45
问题 I use this code to open links with Chrome Custom Tabs. But it's showing @Deprecated for setToolbarColor() and setSecondaryToolbarColor() . I haven't found anything for replacement. Note: Android studio suggests "Use setDefaultColorSchemeParams instead." but haven't found any examples of that. Uri uri = Uri.parse(url); CustomTabsIntent.Builder intentBuilder = new CustomTabsIntent.Builder(); intentBuilder.setToolbarColor(ContextCompat.getColor(activity,R.color.background)); intentBuilder

Hide div in a Custom Tab opened from a Trusted Web Activity

空扰寡人 提交于 2021-01-29 05:10:34
问题 I have an Android app which uses Trusted Web Activity with an external link. When clicking link it opens in an in-app browser (Custom Tabs). I want hide a div in that Custom Tabs page, but I want to show that div when the site opens in Chrome. Is it possible? The div is like below. <div id="something" class="something"><a class="btn btn-primary" href="somelink">text</a></div> 回答1: Assuming the developer controls both sites involved, if the Trusted Web Activity is opening https://siteA.com and

Android: hide the statusbar in Chrome Custom Tabs

╄→гoц情女王★ 提交于 2021-01-28 22:37:25
问题 I launch some url with Chrome Custom Tabs in my app and I want to hide the statusbar from the opened window. Is it possible? 回答1: Currently, it's not possible to open a Custom Tab in Chrome with the status bar hidden. It is possible to enable the bar to hide once the user scrolls down the content by calling CustomTabsIntent.enableUrlHiding() 来源: https://stackoverflow.com/questions/38491936/android-hide-the-statusbar-in-chrome-custom-tabs

EXIT_ANIMATION_BUNDLE not working with Chrome Custom Tabs

折月煮酒 提交于 2021-01-27 16:46:01
问题 I'm trying to incorporate Chrome Custom Tabs in my app and I'm having difficulty getting the exit animation working. I'm following the docs found here: Link The code I'm using is like the following: String EXTRA_CUSTOM_TABS_EXIT_ANIMATION_BUNDLE = "android.support.customtabs.extra.EXIT_ANIMATION_BUNDLE"; Bundle finishBundle = ActivityOptions.makeCustomAnimation(mActivity, android.R.anim.slide_in_left, android.R.anim.slide_out_right).toBundle(); i.putExtra(EXTRA_CUSTOM_TABS_EXIT_ANIMATION

EXIT_ANIMATION_BUNDLE not working with Chrome Custom Tabs

眉间皱痕 提交于 2021-01-27 16:42:39
问题 I'm trying to incorporate Chrome Custom Tabs in my app and I'm having difficulty getting the exit animation working. I'm following the docs found here: Link The code I'm using is like the following: String EXTRA_CUSTOM_TABS_EXIT_ANIMATION_BUNDLE = "android.support.customtabs.extra.EXIT_ANIMATION_BUNDLE"; Bundle finishBundle = ActivityOptions.makeCustomAnimation(mActivity, android.R.anim.slide_in_left, android.R.anim.slide_out_right).toBundle(); i.putExtra(EXTRA_CUSTOM_TABS_EXIT_ANIMATION