Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-17481] iOS: HeaderView of a ListView cannot be higher than screen size

GitHub Issuen/a
TypeBug
Priorityn/a
StatusOpen
ResolutionUnresolved
Affected Version/sn/a
Fix Version/sn/a
Componentsn/a
Labelsalloy, headerview, ios, listview
ReporterFrançois Mériaux
AssigneeUnknown
Created2014-08-10T13:28:50.000+0000
Updated2018-04-18T16:25:09.000+0000

Description

On iOS, the height of the HeaderView of a ListView cannot be higher than the screen size. As a result, long views cannot be displayed entirely.
<Alloy>
	<Window class="container">
		<ListView>
			<HeaderView>
				<View height="800dp" width="Ti.UI.FILL" backgroundColor="blue">
					<Label text="Hello world" backgroundColor="white"/>
				</View>
			</HeaderView>
			<ListSection>
                <ListItem title="Number 1"></ListItem>
                <ListItem title="Number 2"></ListItem>
            </ListSection>
		</ListView>
	</Window>
</Alloy>
The HeaderView is not entirely displayed. On Android, the entire HeaderView is displayed. See attached screenshots.

Attachments

FileDateSize
android_headerView_bottom.png2014-08-10T13:28:50.000+000060391
android_headerView_top.png2014-08-10T13:28:50.000+000054808
iOS_headerView_bottom.PNG2014-08-10T13:28:50.000+000025947
iOS_headerView_top.PNG2014-08-10T13:28:50.000+000020836

Comments

  1. Shuo Liang 2014-08-11

    I can reproduce this problem with Iphone 4, SDK 3.3.0.GA. And not just happen in Alloy, but also in normal project. Here is the test case for normal project.
       var win = Ti.UI.createWindow({
       	backgroundColor: 'white'
       });
       
       var header = Ti.UI.createView({
       	height: "1000dp",
       	backgroundColor : "blue",
       });
       
       var label = Ti.UI.createLabel({
       	text : "Hello world",
       	backgroundColor : "white"
       });
       
       header.add(label);
       
       
       var listView = Ti.UI.createListView({
       	headerView: header,
       });
       
       var sections = [];
       
       var numSection = Ti.UI.createListSection();
       var numDataSet = [
           {properties: { title: 'Num 1'}},
           {properties: { title: 'Num 2'}},
       ];
       numSection.setItems(numDataSet);
       sections.push(numSection);
       
       listView.sections = sections;
       win.add(listView);
       win.open();
       
  2. Cyprian Kowalczyk 2015-09-22

    It occurs on the latest SDK as well.
  3. Sergey Volkov 2018-04-18

    Same for 7.1.0

JSON Source