对于那些想在Android底部(类似iOS)使用原生“完成”按钮的人,我已经在cordova-plugin-inappbrowser的这个分支上实现了这样的功能,具体请查看此处。
更新:2018年1月
我的pull request已经合并到官方插件仓库中,
因此你可以等待下一个发布版本(2.0.2或更高版本),或者从Github直接安装,例如:
cordova plugin add https://github.com/apache/cordova-plugin-inappbrowser
原回答
The implementation is an extension of PR #246 which is currently (4 December 2017) awaiting approval to merge. Once that's done, I'll open a separate issue and PR to merge this back into the master cordova-plugin-inappbrowser
.
这里有一些相关选项的屏幕截图:
location=yes, footer=yes
![](https://user-images.githubusercontent.com/2345062/33147006-2a602f88-cfbe-11e7-9580-438b07236400.png)
location=no, footer=yes
![](https://user-images.githubusercontent.com/2345062/33147147-a60efaba-cfbe-11e7-8132-120179e8b43e.png)
location=yes, footer=yes, closebuttoncaption=Done
![](https://user-images.githubusercontent.com/2345062/33147185-ca8d1e6c-cfbe-11e7-9646-0e1cea52abce.png)
location=no, footer=yes, closebuttoncaption=Done, closebuttoncolor=#0000ff
![](https://user-images.githubusercontent.com/2345062/33147285-1aa7bc54-cfbf-11e7-9b9b-576f0d87ed9a.png)
location=no, footer=yes, footercolor=#0000ff, closebuttoncaption=Done
![](https://user-images.githubusercontent.com/2345062/33147316-3ab511fe-cfbf-11e7-8b19-d1de80ad289e.png)
location=no, footer=yes, footercolor=#00ff00, closebuttoncaption=Done, closebuttoncolor=#0000ff
![](https://user-images.githubusercontent.com/2345062/33147348-581b55c8-cfbf-11e7-9490-c61d83957079.png)
location=no, footer=yes, footercolor=#CC000000, closebuttoncaption=Done, closebuttoncolor=#00FFFF
![](https://user-images.githubusercontent.com/2345062/33147377-6ec46c6a-cfbf-11e7-969e-a075142133c4.png)