Appcelerator: Android Window not full screen with top and bottom ~2% still showing the splash screen

我的梦境 提交于 2019-12-12 01:48:47

问题


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

<?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>

Splash Screen

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


回答1:


Remove these two attributes from custom_theme.xml:

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

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.




回答2:


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

Seems to be the problem, however I used this to change the padding on my text fields as they didn't display correctly without it. I will have to find another way to make the UI work



来源:https://stackoverflow.com/questions/38469650/appcelerator-android-window-not-full-screen-with-top-and-bottom-2-still-showi

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!