无法隐藏标题栏 Titanium with Alloy [英] Can't hide titlebar Titanium with Alloy
问题描述
我在使用 Alloy MVC 的 Titanium Appcelerator 中遇到了问题.此问题包含以下内容(见图)
I have encounterd a problem in Titanium Appcelerator using Alloy MVC. This problem contains the following(see image)
我无法删除找到应用名称和徽标的黑条.我正在设备上运行该应用(Google Nexus,无模拟器)
I can't remove the black bar where the app name and logo is found. I am running the app on a device(Google Nexus, no simulator)
我尝试了以下方法来删除它:
I have tried the following to remove this:
XML:
<Alloy>
<Window>
</Window>
</Alloy>
TSS:
"Window":
{
navBarHidden:true,
fullscreen:true,
backgroundColor:"Orange",
orientationModes:[Ti.UI.PORTRAIT],
}
TiApp.XML:
<statusbar-style>default</statusbar-style>
<statusbar-hidden>true</statusbar-hidden>
<fullscreen>true</fullscreen>
<navbar-hidden>true</navbar-hidden>
但是这些选项都不能隐藏这个黑条.在 iOS 模拟器中,它仅通过将属性 fullscreen
设置为 true
But none of these options are working to hide this black bar. In the iOS simulator it does remove the navigation bar by only setting the property fullscreen
to true
还有其他选择可以解决这个问题吗?提前致谢!
Are there other options to get this away? Thanks in advance!
推荐答案
可能是显示的 ActionBar 吗?尝试隐藏它.
Is it the ActionBar that's showing perhaps? Try hiding it.
修改主题隐藏操作栏:
- 向您的项目添加自定义主题文件:
platform/android/res/values/custom_theme.xml:
platform/android/res/values/custom_theme.xml:
<?xml version="1.0" encoding="utf-8"?> <resources>
<style name="Theme.NoActionBar" parent="@style/Theme.Titanium">
<!-- Depending on the parent theme, this may be called android:windowActionBar instead of windowActionBar -->
<item name="windowActionBar">false</item>
</style> </resources>
取自:http://docs.appcelerator.com/titanium/3.0/#!/guide/Android_Action_Bar
这篇关于无法隐藏标题栏 Titanium with Alloy的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!