How do i get a slash screen default mode set to landscape in Titanium. In my app i tried
Titanium.UI.orientation = Titanium.UI.LANDSCAPE_LEFT;
var NavigationController = require('NavigationController').NavigationController;
var windows = require('window_js').windows;
and in window_js.js its
exports.windows = function(navController){
var window = Ti.UI.createWindow({
backgroundColor : '#fff',
navBarHidden : true,
fullscreen:true
});
return window;
};
But this code shows an error Wrapped java.lang.RuntimeException: java.lang.NullPointerException (file:///android_asset/Resources/app.js#1)
and afterremovinf line 1 i.e.
Titanium.UI.orientation = Titanium.UI.LANDSCAPE_LEFT;
App starts in portrait mode and splash screen quickly changes to the landscape mode. What is the possible solution for this ? Thanks.
Splash screen in landscape mode is goto android project folder
Project —> Build —- > Android ——> AndroidManifest.xml file .
Copy AndroidMenifest.xml file text and put in AndroidManifest.custom.xml file in same folder where AndroidManifest.xml file is kept.
In activity tag write
and replace
to
in whole file in each activity .
Example
This worked for me 🙂