下面是我的代码。它在 iPhone 上完美运行,但图像在 Android 上被拉伸,所以它没有显示标签。
var friendsButton = Titanium.UI.createButton({
top : 0,
left : 91,
width : 90,
height : 101,
style : 0,
backgroundImage : '/img/buttonMiddle.png',
image : '/img/friendcopy.png'
});
var friendLabel = Titanium.UI.createLabel({
top : 35,
left : 25,
width : 100,
height : 100,
text : 'Friend',
color : 'white',
font : {fontSize:12}
});
friendsButton.add(friendLabel);
请帮助我。我是钛新手