Fai*_*han 6 android google-chrome webview chrome-custom-tabs
我正在尝试用项目中的Chrome自定义标签替换Web视图。为了替换webview,我需要在Chrome标签页中进行回调,例如android web view提供的回调。那么,有没有回调可用,如果可用,那么它们是什么?请事先帮助我。
您只能在 chrome 自定义选项卡中提供以下回调:
/**
* Sent when the tab has started loading a page.
*/
public static final int NAVIGATION_STARTED = 1;
/**
* Sent when the tab has finished loading a page.
*/
public static final int NAVIGATION_FINISHED = 2;
/**
* Sent when the tab couldn't finish loading due to a failure.
*/
public static final int NAVIGATION_FAILED = 3;
/**
* Sent when loading was aborted by a user action before it finishes like clicking on a link
* or refreshing the page.
*/
public static final int NAVIGATION_ABORTED = 4;
/**
* Sent when the tab becomes visible.
*/
public static final int TAB_SHOWN = 5;
/**
* Sent when the tab becomes hidden.
*/
public static final int TAB_HIDDEN = 6;
Run Code Online (Sandbox Code Playgroud)
要附加回调,请像往常一样绑定到自定义选项卡服务,并在调用 newSession() 时传递回调。
更多信息:https : //developer.android.com/reference/android/support/customtabs/CustomTabsClient.html#newSession(android.support.customtabs.CustomTabsCallback)
实施指南:https : //developer.chrome.com/multidevice/android/customtabs#implementationguide
| 归档时间: |
|
| 查看次数: |
1535 次 |
| 最近记录: |