问题描述
可能重复:
Removing从浏览器(查看在Android)
我试图运行Android的基于Web的应用程序,我想在运行应用程序隐藏的网页地址栏。那可能吗?我该怎么做呢?
I'm trying to run a web-based application in Android, and I want to hide the webpage address bar while running the application. Is that possible? How do I do it?
推荐答案
在文档加载执行这个JavaScript将滚动浏览器下来,让地址栏在屏幕之外:
Executing this JavaScript on document load will scroll the browser down so that the address bar is off screen:
window.scrollTo(0, 1);
这可能是一样好,你会去写一个原生的Android应用程序中的的WebView
来显示你的Web应用程序。
That's probably as good as you're going to get without writing a native Android app with a WebView
to display your webapp in.
编辑:请注意,这仅适用于旧的默认Android浏览器。它不与浏览器工作。
Note that this only works for the old default Android browser. It does not work with Chrome.
这篇关于如何隐藏在Android的网页的地址栏?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!