Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-19697] Windows: No way to set ListItem height

GitHub Issuen/a
TypeBug
PriorityNone
StatusClosed
ResolutionFixed
Resolution Date2015-11-02T20:11:34.000+0000
Affected Version/sRelease 5.0.2
Fix Version/sRelease 5.1.0
ComponentsWindows
Labelsn/a
ReporterFokke Zandbergen
AssigneeKota Iguchi
Created2015-10-09T11:41:52.000+0000
Updated2015-11-09T20:13:26.000+0000

Description

The following sample and screenshots show that on Windows the list item height is always the full screen height, regardless of different ways to set the list item height that work fine on iOS.
var win = Ti.UI.createWindow({
	backgroundColor: '#CCC'
});

win.add(Ti.UI.createListView({
	templates: {
		tplHeight: {
			properties: {
				height: 100
			},
		    childTemplates: [
		        {
		            type: 'Ti.UI.Label',
		            bindId: 'title'
		        }
		    ]
		},
		viewHeight: {
			properties: {
				height: Ti.UI.SIZE
			},
		    childTemplates: [
		        {
		            type: 'Ti.UI.View',
		            properties: {
		                height: 100
		            },
				    childTemplates: [
				        {
				            type: 'Ti.UI.Label',
				            bindId: 'title'
				        }
				    ]
		        }
		    ]
		}
	},
	sections: [
		Ti.UI.createListSection({
			items: [
				{
					properties: {
						title: 'Built-in tpl'
					}
				},
				{
					properties: {
						title: 'Built-in tpl with height',
						height: 100
					}
				},
				{
					template: 'tplHeight',
					title: {
						text: 'Template with height on root'
					}
				},
				{
					template: 'viewHeight',
					title: {
						text: 'Template with height on view'
					}
				},
				{
					properties: {
						title: 'Built-in tpl'
					}
				}
			]
		})
	]
}));

win.open();

Attachments

FileDateSize
IMG_9737.PNG2015-10-09T11:41:48.000+000068784
Screen Shot 2015-10-09 at 13.38.07.png2015-10-09T11:41:48.000+000018415

Comments

  1. Kota Iguchi 2015-10-30

    https://github.com/appcelerator/titanium_mobile_windows/pull/459
  2. Ewan Harris 2015-11-09

    Verified using: OS: Microsoft Windows 8.1 Pro Appc core: 5.1.0-43 Appc NPM: 4.2.1 Ti SDK: 5.1.0.v20151104190037 Lumia 930 (8.1) Using the code provide, ListItem height can now be set !http://puu.sh/lfxqP/0b767befce.png! Closing ticket

JSON Source