Skip to content

Instantly share code, notes, and snippets.

@jonalter
Created September 8, 2011 17:31
Show Gist options
  • Select an option

  • Save jonalter/1204026 to your computer and use it in GitHub Desktop.

Select an option

Save jonalter/1204026 to your computer and use it in GitHub Desktop.
Android: app and splash screen orientation with TiSDK 1.7.2 (must use custom AndroidManifest.xml)
<!-- add android:screenOrientation="portrait" to the main activity -->
<!-- This sets the splash screen -->
<activity android:name=".Test1Activity" android:screenOrientation="portrait"
android:label="Test1" android:theme="@style/Theme.Titanium"
android:configChanges="keyboardHidden|orientation">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
var window = Ti.UI.createWindow({
backgroundColor : 'white',
layout : 'vertical'
});
// this sets the window
window.orientationModes = [Ti.UI.PORTRAIT];
var button = Ti.UI.createButton({
title : 'test',
width : 150,
height : 60,
top : 20
});
window.add(button);
window.open();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment