Appcelerator: Android Window not full screen with

2019-09-18 20:45发布

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)

2条回答
等我变得足够好
2楼-- · 2019-09-18 21:12

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.

查看更多
不美不萌又怎样
3楼-- · 2019-09-18 21:14
<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

查看更多
登录 后发表回答