[ALOY-930] ListView: HeaderView must come before Templates tag or it won't show up
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Low |
Status | Resolved |
Resolution | Cannot Reproduce |
Resolution Date | 2014-03-17T15:57:49.000+0000 |
Affected Version/s | Alloy 1.3.0 |
Fix Version/s | n/a |
Components | n/a |
Labels | n/a |
Reporter | Tim Poulsen |
Assignee | Tim Poulsen |
Created | 2014-01-20T14:48:30.000+0000 |
Updated | 2014-06-18T22:43:28.000+0000 |
Description
See discussion at http://developer.appcelerator.com/question/161525/headerview-in-listview-not-shown-when-put-templates
Test case below. Simply put the HeaderView before the Templates tag and the header will be visible.
OP states works in either order on Android.
<Alloy>
<Window fullscreen="true">
<ListView>
<Templates>
<ItemTemplate name="menu">
<ImageView bindId="pic" id="icon" />
<Label bindId="info" id="title" />
</ItemTemplate>
</Templates>
<HeaderView>
<View height="Ti.UI.SIZE">
<Label>Title</Label>
</View>
</HeaderView>
<ListSection>
<ListItem title="Papaya" searchableText="Papaya"/>
<ListItem title="Peach" searchableText="Peach"/>
<ListItem title="Pear" searchableText="Pear"/>
<ListItem title="Persimmon" searchableText="Persimmon"/>
<ListItem title="Pineapple" searchableText="Pineapple"/>
<ListItem title="Pluot" searchableText="Pluto"/>
<ListItem title="Pomegranate" searchableText="Pomegranate"/>
</ListSection>
<FooterView>
<View height="Ti.UI.SIZE">
<ImageView image="/appicon.png" />
<Button title="Info&Credits" />
</View>
</FooterView>
</ListView>
</Window>
</Alloy>
Attachments
File | Date | Size |
---|---|---|
ALOY-930.zip | 2014-03-17T15:57:06.000+0000 | 1534 |
Test case app attached
I cannot reproduce this issue using Alloy 1.3.1 GA or the pre-release Alloy 1.4.0. I used the attached test case with the HeaderView before and after the Templates; either way the header shows up fine.