Appcelerator:Android Window 不是全屏,顶部和底部 ~2% 仍然显示启动画面 [英] Appcelerator: Android Window not full screen with top and bottom ~2% still showing the splash screen

查看:27
本文介绍了Appcelerator:Android Window 不是全屏,顶部和底部 ~2% 仍然显示启动画面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的所有应用都遇到了这个问题.它在所有操作系统版本中都是持久的.下面的截图看看是什么问题.窗口顶部和底部有条形图,应用程序运行时可以在其中看到启动画面.

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(您可以在顶部和底部看到启动画面仍然可见)

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 Window 不是全屏,顶部和底部 ~2% 仍然显示启动画面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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