Last active
April 24, 2017 07:55
-
-
Save kosso/32931182c4a707d42572fc7ab35de501 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Creates our main root window. Fullscreen all the way! | |
var win = require('/ui/common/window_home').createWindow(); | |
if(Ti.Platform.osname==='android'){ | |
// This Theme makes sure the windows are full screen and buttons aren't always in caps. | |
// mytheme.xml lives in /platform/android/res/values - see below. | |
win.open({theme: "MyAmazingTheme"}); | |
} else { | |
var rootNavWin = Titanium.UI.iOS.createNavigationWindow({ | |
zIndex:1, | |
window: win | |
}); | |
win.containingNav = rootNavWin; | |
// Always add the parent window as the containingNav param to open a new subsequent window. | |
rootNavWin.open(); | |
} | |
/** | |
mytheme.xml | |
<?xml version="1.0" encoding="utf-8"?> | |
<resources> | |
<!-- this is our main root window for android. fullscreen. no bars. --> | |
<style name="Theme.NoActionBar" parent="@style/Theme.AppCompat"> | |
<item name="windowActionBar">false</item> | |
<item name="android:windowNoTitle">true</item> | |
<item name="android:textAllCaps">false</item> | |
</style> | |
<style name="MyAmazingTheme" parent="@style/Theme.AppCompat.Fullscreen"> | |
<item name="android:textAllCaps">false</item> | |
<item name="android:windowNoTitle">true</item> | |
</style> | |
</resources> | |
**/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment