[TIMOB-16240] Android: Images smaller than expected for Buttons, Menu Icons, Map Pins
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2014-12-01T21:50:25.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 4.0.0 |
Components | Android |
Labels | exalture, merge-3.5.0 |
Reporter | David Bankier |
Assignee | Sunila |
Created | 2014-01-16T10:36:07.000+0000 |
Updated | 2015-02-13T01:09:25.000+0000 |
Description
For Buttons, ActionBar Menu Icons, Map pins, etc (excluding ImageView) depending on the location of the source image, the images are sometimes smaller than expected.
See the following comment for the full details, sample code to tests, assets and screenshots.
https://github.com/dbankier/TiShadow/issues/180#issuecomment-32426567
(Please Note: even though the issue is raised in the TiShadow repository the comment _only_ refers to direct usage of Titanium without TiShadow.)
Seeing it in the ActionBar and in TableViewRow::rightImage as well.
I can also confirm this issue. It can be easily reproduced using a base64 image at the expected size. For instance, on my FullHD device, a 48dp icon should be 144px. Using this image in a ImageView shows an image correctly sized. Half-sized in the action bar.
Scale the image based on device density if it is not loaded from resource https://github.com/appcelerator/titanium_mobile/pull/6177
The issue is marked fix version 3.5.0, but the fix does not work on the latest CI build from 3_5_X branch. However, the issue is fixed in the master branch for appropriately scaled images on button and action bar. Re-opening as it is not fixed in 3_5_X branch. Verified on: SDK: 3.5.0.v20141125154115, 3.6.0.v20141125154117(master) Studio: 3.4.1.201410281743 CLI: 3.4.1 Alloy: 1.5.1 Device: Nexus 5 (4.4.4), Nexus 4 (4.4.4)
There is also no reason to not port this to 3_4_X - I already did that in my fork and it works fine.
Fixed, but needs backport.
Verified fix on: Mac OSX 10.10.2 Appcelerator Studio, build: 4.0.0.201502051633 Titanium SDK build: 4.0.0.v20150212161920 Titanium CLI, build: 3.6.0-dev Alloy: 1.6.0-alpha Android Build tools 21.1.2 Nexus 6 (5.0.1), Galaxy S3(4.4.2) Built to both devices, the images are appropriately scaled. Closing ticket.