问题
I have implemented new Chrome Custom Tab in android, I am using the following code to open
String url = "http://www.flipkart.com/";
int color = Color.BLUE;
CustomTabsIntent.Builder intentBuilder = new CustomTabsIntent.Builder();
intentBuilder.setToolbarColor(color);
intentBuilder.setShowTitle(true);
CustomTabActivityHelper.openCustomTab(
this, intentBuilder.build(), Uri.parse(url), new WebviewFallback());
I need to secure my URL or not like to show my URL to User, But there is a option Open in Chrome in default menu, By using this link user can open my URL in browser,By how hide the default menu?
回答1:
At this moment, it's not possible to hide the overflow menu or "Open in Chrome" menu item.
回答2:
There are no methods for hiding the menu option in Chrome custom tabs
回答3:
Chrome Custom Tab actually uses Chrome app in user's mobile.
start activity in Chrome app by link, If chrome not installed on the user's mobile, it will use a webView as the default.
In fact, Chrome Custom Tabs is designed to display a web page where the user is sure that the programmer of that software does not have a phishing, Like a bank payment.
Therefore, you must show the options in the toolbar to the user.
回答4:
You must add hiding flag before. To disable your URL parameter but it can't hide your site name.
intentBuilder.enableUrlBarHiding();
来源:https://stackoverflow.com/questions/32449554/hide-disable-default-menu-in-chrome-custom-tab