Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-16483] Android: ScrollView inside ListView is ignored (display nothing)

GitHub Issuen/a
TypeBug
PriorityLow
StatusOpen
ResolutionUnresolved
Affected Version/sRelease 3.2.1
Fix Version/sn/a
ComponentsAndroid
Labelsn/a
ReporterJungwook Son
AssigneeUnknown
Created2014-02-13T16:41:03.000+0000
Updated2018-02-28T20:03:10.000+0000

Description

ScrollView is not shown in a ListView.
			var w = Ti.UI.createWindow({
				backgroundColor: "#fff",
			});
			
			var template = {
				properties: {
					selectedBackgroundColor: 'blue',
					height: 150,
				},
				childTemplates: [
					{
						type: 'Ti.UI.View',
						properties: { backgroundColor: "#ddd" },
						childTemplates: [
							{
								type: 'Ti.UI.ScrollView',
								bindId: 'wrapper',
								properties: {
									width: Ti.UI.FILL,
									height: 100,
									scrollType: 'horizontal'
								},
								childTemplates: [
									{
										type: 'Ti.UI.Label',
										properties: {
											left: 150, text: "Hello World", height: Ti.UI.FILL
										},
									},
									{
										type: 'Ti.UI.View',
										properties: {
											left: 0, width: 300, height: Ti.UI.FILL, backgroundColor: 'red'
										},
									},
									{
										type: 'Ti.UI.View',
										properties: {
											left: 600, width: 300, height: Ti.UI.FILL, backgroundColor: 'green'
										},
									},
									{
										type: 'Ti.UI.View',
										properties: {
											left: 300, width: 300, height: Ti.UI.FILL, backgroundColor: 'blue'
										},
									}
								]
							}
						]
					}
				]
			};
			
			var listView = Ti.UI.createListView({
				templates: { 'template': template },
				defaultItemTemplate: 'template'
			});
			var sections = [];
			
			var section = Ti.UI.createListSection();
			section.setItems([
				{ template: 'template' },
				{ template: 'template' },
				{ template: 'template' },
				{ template: 'template' },
				{ template: 'template' },
				{ template: 'template' },
			]);
			
			sections.push(section);
			listView.setSections(sections);
			
			w.add(listView);
			w.open();

Comments

  1. Ritu Agrawal 2014-02-14

    It appears to be a duplicate of TIMOB-15408. Can you please take a look at that ticket and not confirm the same?
  2. Jungwook Son 2014-02-18

    Though both of issues are related to ScrollView/ScrollableView inside ListView, I think it's a different case. 1) TIMOB-15408 describes that there are some incorrect behaviors but ScrollableView/ScrollView displays well. 2) This issue is about the displaying problem that ScrollView inside ListView is not shown. It does not appear even. 3) and I guess that ScrollableView is implemented on android's ViewPager, but ScrollView is just using android's ScrollView. Maybe it is possible to have some relationship between ScrollableView and ScrollView implementation.
  3. Ritu Agrawal 2014-02-20

    Moving this ticket to engineering as I can reproduce this issue with the provided test case on Android platform. Same test works fine on iOS platform.
  4. Ryan Gartin 2015-10-07

    We are version 5.0.0.GA. Why is this still Open? Working great on iOS. Thanks

JSON Source