Skip to content Skip to sidebar Skip to footer

Custom Close Button For Chrome Custom Tab

Is it possible to override the behaviour of the default close button on custom chrome tabs in Android? For example instead of just closing the chrome tab, can we redirect to a new

Solution 1:

I'm not sure if you can do that. You can try to start the CustomTabIntent for result and wait for it finish and start it from onActivityResult() based on the requestCode you have started it with.

  private void openUrlForResult(CustomTabsIntent customTabsIntent, String url, int requestCode){
        customTabsIntent.intent.setData(Uri.parse(url));
        startActivityForResult(customTabsIntent.intent, requestCode);
    }

Post a Comment for "Custom Close Button For Chrome Custom Tab"