appceleratorappcelerator-titaniumappcelerator-alloy

Alloy ListView with static Header


Is it possible to make the ListView's HeaderView static such that it does not scroll off?

<ListView id="agreementListView" onItemclick = "itemClickAgrmt" class="elementsList" defaultItemTemplate="finAgreement" >
    <HeaderView>
        <View class="row" >
            <Label class="lblAgr col1">Finance</Label>
            <Label class="lblAgr col2">Duration</Label>
            <Label class="lblAgr col3">Monthly</Label>
            <Label class="lblAgr col4">Down</Label>
        </View>
    </HeaderView>
    <Templates>

This HeaderView shows up like another row at the top that scrolls away.


Solution

  • No, you can't. The HeaderView is stick with the ListView and scroll with it. If you want a static view, just add a view before the ListView on top of it.