Hello,
I'm trying to make a loading screen with a progress bar that is displayed while the app is starting up. This screen will be displayed after the splash screen and before the actual start screen of the app. This loading screen is going to have the splash image as the background so it looks like the default splash screen of the app.
I'm using density specific splash image(s) in my app but somehow I can't reference the splash image in my loading screen in Android. In iPhone referencing 'default.png' works fine, but Android can't find it.
I've tried referencing 'default.png', '/images/default.png', 'background.png', '/images/background.png' but Android just can't find it.
I've tried referencing it in both a Window (as a backgroundImage):
var window = Ti.UI.createWindow({ backgroundColor : '#ffffff', //backgroundImage : (Platform.isApple() ? 'default.png' : '/images/default.png'), fullscreen: true, navBarHidden: true, layout: 'composite', orientationModes : [Titanium.UI.PORTRAIT, Titanium.UI.UPSIDE_PORTRAIT] });and referencing it in an ImageView:
var splashImage = Ti.UI.createImageView({ image: 'default.png', top: 0, left: 0, width: '100%', height: '100%' }); window.add(splashImage);
Does anybody know the trick to referencing the correct density-specific splash image in Android?
2 Answers
try ../../../images/your path after images or try ../../images/your path after images
Currently I've worked around this issue by copying all the default.png files to background.png in the same directory.
I hope this issue can get fixed so I don't need to have double splash images in my application anymore.
Your Answer
Think you can help? Login to answer this question!