GitHub Issue | n/a |
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2012-11-13T19:46:49.000+0000 |
Affected Version/s | Release 2.1.2, Release 2.1.3 |
Fix Version/s | Release 3.1.0, 2012 Sprint 23 API, 2012 Sprint 23 |
Components | iOS |
Labels | core, layout, module_scrollview, parity, qe-testadded, triage |
Reporter | Amuktha Akkinepally |
Assignee | Vishal Duggal |
Created | 2012-10-30T22:20:14.000+0000 |
Updated | 2014-06-19T12:44:20.000+0000 |
When trying to add an imageView to a scrollView with a vertical layout, the imageView has a height that is much larger than the image that is displayed. The image is being scaled and displayed but there is a white blank space displayed above, below and around the image. It works fine on Android.
Steps to reproduce:
1.Load the below app.js
2.Run on a iOS Simulator/Device
3.Run the same on Android Device
Expected: There should be no space above the image like in android.
Actual Behavior: There is some empty space above and below the image
app.js:
var detailWindow = Titanium.UI.createWindow({
backgroundColor : '#fff'
});
var detailScrollView = Ti.UI.createScrollView({
layout : 'vertical'
});
var imageView = Ti.UI.createImageView({
image : "https://s3.amazonaws.com/static.tumblr.com/6t3upxl/Aawm08w0l/khout-kitten-458882.jpeg",
top : '10dp'
});
detailScrollView.add(imageView);
detailWindow.add(detailScrollView);
detailWindow.open();
The behavior of both iOS and android is incorrect contentWidth and contentHeight are both undefined so the contents should stretch to show the full image
Pull pending https://github.com/appcelerator/titanium_mobile/pull/3396
Tested with: SDK:3.1.0.v20130114171802 Studio:3.0.1.201212181159 Device: iPad2(v5.1), iphone3GS(v 5.0.1), iPad4(v 6.0) Images are scaled properly inside a vertical scrollview