Appcelerator:Android窗口未全屏显示,顶部和底部约2%仍显示初始屏幕 [英] Appcelerator: Android Window not full screen with top and bottom ~2% still showing the splash screen

查看:54
本文介绍了Appcelerator:Android窗口未全屏显示,顶部和底部约2%仍显示初始屏幕的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我所有的应用程序都遇到了这个问题.它在所有OS版本中都是持久的.下面的屏幕截图可以查看问题所在.窗口的顶部和底部有条,在运行应用程序时可以看到初始屏幕.

I am running into this problem on all my apps. It is persistent across all OS versions. Screenshots below to see what the issue is. There are bars on top and bottom of the window where the splash screen is visible when the app is running.

var self = Titanium.UI.createWindow({
 title : 'Tab 1',
 backgroundColor : '#fff',
 fullscreen : true,
 backgroundImage : "/images/homeBG.png",
 orientationModes : [Titanium.UI.PORTRAIT],
});
self.open();

custom_theme.xml

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>
    <item name="android:paddingBottom">2dp</item>
    <item name="android:paddingTop">2dp</item>
  </style>
</resources>

启动画面

应用屏幕截图(您可以在初始屏幕的顶部和底部看到仍然可见)

App Screen Shot (You can see at the top and bottom where the splash screen is still visible)

推荐答案

从custom_theme.xml中删除这两个属性:

Remove these two attributes from custom_theme.xml:

<item name="android:paddingBottom">2dp</item>
<item name="android:paddingTop">2dp</item>

并尝试在其xml/tss文件中的文本字段上进行计算,因为我确信我永远不需要通过主题文件更改填充,并且可以肯定地从xml/tss中完成填充.

And try to work out on text-fields in their xml/tss file as I am sure that I have never needed to change the padding through theme file and it can definitely be done from xml/tss.

如果愿意,您可以分享文本字段的实际问题,以便人们可以在此方面为您提供帮助.

If you like, then you can share the actual problem of text-fields so that people can help you on that.

这篇关于Appcelerator:Android窗口未全屏显示,顶部和底部约2%仍显示初始屏幕的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆