-->

Chrome custom tabs's close button feature over

2019-08-12 09:44发布

问题:

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.