[TIMOB-16533] Android: Button does not resize image to fit within boundaries
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Low |
Status | Open |
Resolution | Unresolved |
Affected Version/s | Release 3.2.1 |
Fix Version/s | n/a |
Components | Android |
Labels | n/a |
Reporter | Andrew Greenstreet |
Assignee | Unknown |
Created | 2014-02-24T19:09:52.000+0000 |
Updated | 2018-02-28T20:03:59.000+0000 |
Description
If you create a button view with an image:
var button = Ti.UI.createButton({
image : "/images/my-icon.png"
width : Ti.UI.SIZE,
height : 40
title : "My Button"
});
if the image is taller than 40, it will be cropped, rather than scale to fit in the available space. This isn't really an issue on iOS, as there are only two image size choices, but on Android, a 2x (XHDPI) image may be chosen, even if the interface is scaled by some other method. Thus the image may be cropped.
Fixed @ https://github.com/appcelerator/titanium_mobile/pull/5376
Thank you for submitting this pull request. In order for us to evaluate this pull request, we need a simple runnable test case along with the image illustrating the current issue so that we then can use the PR to verify that the issue has been fixed indeed. Again, we appreciate all your effort and hard work.
Moving this ticket to engineering to evaluate this PR in the context of this ticket.