[AC-458] ImageView does not scale images correct
GitHub Issue | n/a |
Type | Bug |
Priority | n/a |
Status | Resolved |
Resolution | Invalid |
Resolution Date | 2015-11-05T08:06:38.000+0000 |
Affected Version/s | Appcelerator Studio 4.3.1 |
Fix Version/s | n/a |
Components | Titanium SDK & CLI |
Labels | ImageView, Scaling, ios |
Reporter | Thomas Neerup |
Assignee | Motiur Rahman |
Created | 2015-10-12T13:12:39.000+0000 |
Updated | 2015-11-05T08:48:34.000+0000 |
Description
According to the docs, setting width or height on an ImageView should cause it to scale the image.
But when setting the height to Ti.UI.FILL the image does not scale setting width to Ti.UI.FILL works fine. The problem exists when upscaling and downscaling.
I Attached an example
To run sample:
1. Create new Alloy project
2. Copy attached index.xml to controllers
3. Copy attached image to /assets/images
4 Run project to iPad emulator
When the app launches notice:
1 Row upscales just fine (height=Ti.UI.FILL)
2 Row does not upscale at all (width=Ti.UI.FILL)..
3 Row downscales just fine (height=Ti.UI.FILL)
4.Row downscales but ImageView also fills the width, so aligning to left or right is not possible(height=Ti.UI.FILL)
Expected results
1 Row images should upscale just like it does now (height=Ti.UI.FILL)
2 Row images should upscale like Row 1 (width=Ti.UI.FILL)..
3 Row images should downscale just like it does now (height=Ti.UI.FILL)
4.Row images should downscale like Row 3 (height=Ti.UI.FILL)
Attachments
Hello [~thomas.neerup@eg.dk], Specifying either a width or height property for the Image view will scale its image(s) with the aspect ratio maintained, up to a maximum size that does not exceed its parent view. Please refer to this [link here](http://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.ImageView). It seems to me this is not an issue. *Testing Environment:* Appcelerator Command-Line Interface, version 5.0.4 Appcelerator Studio, build: 4.3.3.201510212245 Ti sdk: 5.0.2 iOS Simulator: iPad Alloy version: 1.7.18 Thanks
Hi Mostafizur... But as you can see on the posted image this is not the case... I'm a bit confused here. Is my description of the problem not good enough? I set the height to Ti.UI.FILL on the first row of imageviews and it works fine.. I set the width to Ti.UI.FILL on the second row of imageviews and it does not upscalescale correct. Please let me know if I need to explain mere... Thanks