[TIMOB-23723] Windows: ImageView width Ti.UI.SIZE not working
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | Critical |
| Status | Closed |
| Resolution | Fixed |
| Resolution Date | 2016-08-05T00:59:53.000+0000 |
| Affected Version/s | Release 5.4.0 |
| Fix Version/s | Release 5.4.0 |
| Components | Windows |
| Labels | imageview, regression, windows |
| Reporter | Zakhar Zhuravlev |
| Assignee | Gary Mathews |
| Created | 2016-08-03T20:14:16.000+0000 |
| Updated | 2016-08-05T20:40:45.000+0000 |
Description
issue in 5_4_X 5.4.0.v20160802165655
working fine on 5.3.0, but not on 5_4_X 5.4.0.v20160802165655
var scrollView = Ti.UI.createScrollView({
top: 0,
left: 0,
right: 0,
bottom: 0,
backgroundColor: 'yellow',
});
var image = Ti.UI.createImageView({
image: '/icons/default.jpg',
left: 0,
top: 0,
bottom: 0,
width: '1000dp',
height: Ti.UI.FILL,
backgroundColor: 'green',
});
scrollView.add(image);
$.win.add(scrollView);
$.win.open();
ImageView width Ti.UI.SIZE not working.
*Test Code*
var win = Ti.UI.createWindow({backgroundColor: 'purple'}),
img = Ti.UI.createImageView({
image: 'Logo.png',
backgroundColor: 'red',
left: 0,
top: 0,
bottom: 0,
width: Ti.UI.SIZE,
height: Ti.UI.SIZE
});
win.add(img);
win.open();
*Expected*
Image should be visible
master: https://github.com/appcelerator/titanium_mobile_windows/pull/804 5_4_X: https://github.com/appcelerator/titanium_mobile_windows/pull/805 *TEST CASE*
*NOTE* It's good practice to not setvar win = Ti.UI.createWindow({backgroundColor: 'purple'}), img = Ti.UI.createImageView({ image: 'Logo.png', backgroundColor: 'red', left: 0, top: 0, bottom: 0, width: Ti.UI.SIZE, height: Ti.UI.SIZE }); win.add(img); win.open();topandbottomif aheightis already defined. Same forleftrightandwidth.Verified using: Windows 10 Pro Appc core: 5.4.0-3 Appc NPM: 4.2.7 Ti SDK: 5.4.0.v20160804185318 When setting the left, top and bottom properties and also setting width and height on UI elements the element can now be seen. Closing ticket
In last build it's NOT FIXED. Please, test with scroll view. It seems that scroll view wrongly determine content size.