Chrome custom tabs's close button feature override

房东的猫 提交于 2019-12-11 11:43:39

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!