【发布时间】:2012-02-02 00:01:36
【问题描述】:
我有一个尺寸为 200x200 的 image.png。 我将它用作按钮的背景图像,并将按钮大小设置为 60x60。
当我不做任何事情时,按钮(及其图像)按预期正确显示。
当我点击按钮时,背景图像变暗(正常)
但是,单击按钮时,按钮的背景图像(大小)显示不正确。
有谁知道出了什么问题以及如何使单击的变暗图像保持相同大小?
var loginButton = Titanium.UI.createButton({
backgroundImage:'/images/someimage.png',
height: 200 * 0.3,
width: 200 * 0.3,
bottom: 160
left: 65
});
【问题讨论】:
-
设置这个属性
backgroundSelectedImage:'/images/someimage.png',看看它是否适合你。 -
问题是我没有选择的图像版本。我希望选定的版本与未选定的版本相同,但只是具有默认的阴影效果。
标签: image button titanium window-resize click