Kapil
Kapil

Reputation: 1810

Chrome custom tabs's close button feature override

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.

Upvotes: 1

Views: 3602

Answers (2)

seanlinsley
seanlinsley

Reputation: 3195

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

Upvotes: 2

ade
ade

Reputation: 4074

That's not currently possible.

Upvotes: 0

Related Questions