1

“chrome custom tab”的关闭按钮关闭整个webview本身。但是,我希望它覆盖其行为以作为硬件后退按钮行为,以便用户可以返回上一页网页而不是关闭网页视图。

我阅读了很多帖子和博客,但找不到任何解决方案。我找到了更改关闭按钮图标的解决方案。

4

2 回答 2

2

在我的情况下,我的应用程序除了打开 Chrome 自定义选项卡之外什么都不做,所以我能够做到这一点:

// 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();
}

在哪里tryLaunch启动 Chrome

于 2016-11-02T21:20:26.633 回答
0

目前这是不可能的。

于 2016-05-28T20:26:51.403 回答