I have following code
Titanium.UI.setBackgroundColor('#FFFFFF'); var homeWindow = Titanium.UI.createWindow({ backgroundImage: 'HomeBg.png', exitOnClose: true }); var view1 = Titanium.UI.createView({ backgroundColor: 'red', height: '50%', width: '55%', top: 'true', left: 'true' }) homeWindow.add(view1); var view5 = Titanium.UI.createView({ backgroundColor: 'black', height: '50%', width: '50%', bottom: 'true', right: 'true' }) var bookImage = Titanium.UI.createImageView({ url:'Book_icon.png' // image:'Book_icon.png' Also not working }); view5.add(bookImage); view1.add(view5); homeWindow.open();This code is not displaying the image in Image View.
Background Image is showing properly. And there is also Book_icon.png with the HomeBg.png.
I have tried with image as well. that is also not working.
3 Answers
If you are devloping on windows - turn off fast dev and it will show.
http://developer.appcelerator.com/question/120444/how-to-disable-fastdev
turning it off worked for me as well
Why position properties (top, bottom, left, right) are set to string "true"? They should be string/float/integer number (42, '11%', ...) and not true or false (not even string "true" or "false").
Your Answer
Think you can help? Login to answer this question!