问题
Close button of "chrome custom tab" close the entire webview itself. However I want it to override its behaviour to work as hardware back button behaviour so that user can go back to previous page of web instead of closing webview.
I read so many posts and blogs but i could not get find any solution. I have found the solution to change the close button icon.
回答1:
In my case my application does nothing but open the Chrome Custom Tab, so I was able to do this:
// This is called on boot, and when the Chrome Custom Tab's X button in the top left is clicked.
protected void onResume() {
super.onResume();
tryLaunch();
}
where tryLaunch
launches Chrome
回答2:
That's not currently possible.
来源:https://stackoverflow.com/questions/37485085/chrome-custom-tabss-close-button-feature-override