Titanium: Image -> "auto"
Let's say I have an image called hello.png with dimensions 200x100. I create a button using that hello.png like this: var button = Titanium.UI.createButton({ bottom : 50, backgroun
Solution 1:
If you avoid the height=auto
, it will work.It will take the parent height in some case the auto height value wont be equal to the parent window height. In the below code sample it will work as the button width will be fixed to 100 but the height will be changing accordance with the window size.
var window = Titanium.UI.createWindow();
var button = Titanium.UI.createButton({
bottom : 50,
backgroundImage : "assets/images/boston_college.png",
width:100
});
window.add(button);
window.open();
Post a Comment for "Titanium: Image -> "auto""