GitHub Issue | n/a |
Type | Bug |
Priority | Trivial |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2012-04-27T10:15:55.000+0000 |
Affected Version/s | Release 1.7.3, Release 1.7.5, Release 1.8.0 |
Fix Version/s | Release 2.1.0, Sprint 2012-08 |
Components | Android |
Labels | api, module_button, parity, qe-testadded, release-note-2.1.0 |
Reporter | Eduardo Gomez |
Assignee | Ping Wang |
Created | 2011-11-04T09:12:55.000+0000 |
Updated | 2012-07-10T16:01:09.000+0000 |
Problem
The button's image attribute does not work as described in documentation "the image to display on the button to the left of the title". Image scales to fill the entire button background.
Titanium API - Image property
http://developer.appcelerator.com/apidoc/mobile/latest/Titanium.UI.Button-object
Tested on
Android Emulator v2.2 & Android LG Ally device v2.2.1
Repro sequence
var win1 = Titanium.UI.createWindow({
title:'Win 1',
backgroundColor:'#fff'
});
var button = Titanium.UI.createButton({
top: 60,
title : 'Hello',
width : '140',
height : '40',
//backgroundImage : 'button.png',
image: 'button.png',
//backgroundLeftCap:12,
//backgroundTopCap:12,
//textAlign: Titanium.UI.TEXT_ALIGNMENT_RIGHT
});
win1.add(button);
win1.open();
Associated HD ticket
APP-379158
Folks any updates on this issue? This means that we cant create any buttons with images. We are having to upgrade to 1.7.X or 1.8.X due to blocking bugs and now UI is broken. Any status on this would be greatly appreciated.
Is this a documentation bug for an iOS only feature, or would the Button's leftDrawable attribute potentially support this?
We believe it a bug.
I believe this is a parity issue. As far as I can tell, Android treats
image
andbackgroundImage
the same way. Documenting the current behavior for now. Already marked as a parity issue so we can see if this can be addressed.I see that this was scheduled to be fixed and then removed. Any update to this issue as to when/if it can be fixed?
A modified test case is with the proper image and height:
Closing as fixed. Verified with: Titanium Studio, build: 2.1.0.201206221045 Titanium SDK: 2.1.0.v20120622174154 Device: Samsung Galaxy tab (3.2)