Titanium JIRA Archive
Alloy (ALOY)

[ALOY-930] ListView: HeaderView must come before Templates tag or it won't show up

GitHub Issuen/a
TypeBug
PriorityLow
StatusResolved
ResolutionCannot Reproduce
Resolution Date2014-03-17T15:57:49.000+0000
Affected Version/sAlloy 1.3.0
Fix Version/sn/a
Componentsn/a
Labelsn/a
ReporterTim Poulsen
AssigneeTim Poulsen
Created2014-01-20T14:48:30.000+0000
Updated2014-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

FileDateSize
ALOY-930.zip2014-03-17T15:57:06.000+00001534

Comments

  1. Tim Poulsen 2014-03-17

    Test case app attached
  2. Tim Poulsen 2014-03-17

    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.

JSON Source