Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-23723] Windows: ImageView width Ti.UI.SIZE not working

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2016-08-05T00:59:53.000+0000
Affected Version/sRelease 5.4.0
Fix Version/sRelease 5.4.0
ComponentsWindows
Labelsimageview, regression, windows
ReporterZakhar Zhuravlev
AssigneeGary Mathews
Created2016-08-03T20:14:16.000+0000
Updated2016-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

Comments

  1. Gary Mathews 2016-08-04

    master: https://github.com/appcelerator/titanium_mobile_windows/pull/804 5_4_X: https://github.com/appcelerator/titanium_mobile_windows/pull/805 *TEST CASE*
       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();
       
    *NOTE* It's good practice to not set top and bottom if a height is already defined. Same for left right and width.
  2. Ewan Harris 2016-08-05

    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
  3. Zakhar Zhuravlev 2016-08-05

    In last build it's NOT FIXED. Please, test with scroll view. It seems that scroll view wrongly determine content size.

JSON Source