如何阻止从 SL4A 启动的 WebView 隐藏通知栏?
我正在为使用 WebView 的 Python SL4A 小脚本构建一个 UI,但我发现有点烦人的是,当我从 SL4A 脚本 (droid.webViewShow(...)) 启动 WebView 时,Android 通知栏被隐藏了!
这是一些代码:
import android
droid = android.Android()
droid.webViewShow('file:///sdcard/sl4a/scripts/sample.html')
有没有办法改变这种行为?我缺少任何参数或配置吗?
I'm building a UI for my little Python SL4A script that uses WebViews, but I find a little annoying that when I launch my WebView from the SL4A script (droid.webViewShow(...)) the Android notification bar gets hidden!
Here's some code:
import android
droid = android.Android()
droid.webViewShow('file:///sdcard/sl4a/scripts/sample.html')
Is there a way to change this behavior? Any parameter or configuration I'm missing?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
听起来您需要稍微重新构建您的解决方案。我建议您在layout.xml 文件中定义webview 及其所在的区域。在清单中,您可以定义该活动是否是全屏活动,最后,您可以从客户端代码实例化它并呈现到当前活动中。
尝试查看 http://developer.android.com/guide/ tutorials/views/hello-webview.html 了解正确的架构。
如果我误解了您的问题,您可能会考虑发布额外的代码,以便更好地理解问题。
It sounds like you need to re-architect your solution a bit. I would recommend you layout.xml file define the webview and the area of which it resides. In your manifest, you can define if the activity is a fullscreen activity or not, and lastly, you would instantiate it from your client code and render into the current activity.
Try taking a look at http://developer.android.com/guide/tutorials/views/hello-webview.html to get an idea for proper architecture.
If I'm misinterpreted your question, you might consider posting additional code so there is a better understanding of the problem.