If I create a button with a background image
Ti.UI.createButton({backgroundImage:'red.png'});The size is wrong. I tried setting width and size to Ti.UI.SIZE, 'auto', '100%', but it's not using the actual image size. I don't want to hardcode a size because the size would be different on ios and android at different resolutions.
How can I get the button to size itself to the image?
1 Answer
Accepted Answer
I would suggest, if it's not overkill, why not create a utility function that gets the size from the image blob and then set the size of the button to it. Otherwise, the background image is always resized to the button, not otherwise
Your Answer
Think you can help? Login to answer this question!