Search code examples
titaniumtitanium-mobiletitanium-alloy

Titanium Layout not working while set touchEnabled=false inside Listview


When I set touchEnabled="false" for a view which was inside my List view template all my list view layout was broken. when i remove the touch enabled property it working fine. Anyone please help me to solve this issue. Titanium SDK : 3.4.0 , OS : IOS and android, Here is my sample code.

<Alloy>
    <Window backgroundColor="#fff">
        <ListView id="LstView" top="50" defaultItemTemplate="template1">
            <Templates >
                <ItemTemplate id="mytemplate" name="template1">
                    <View layout="horizontal" width="Ti.UI.FILL" touchEnabled="false">
                        <View width="Ti.UI.SIZE" height="Ti.UI.SIZE" left="5">
                            <Label bindId="Lbl1" Id="Lbl1" color="black"></Label>
                        </View>
                        <View width="Ti.UI.SIZE" height="Ti.UI.SIZE" left="10" >
                            <Label bindId="Lbl2" Id="Lbl2" color="black"></Label>
                        </View>
                        <View width="Ti.UI.SIZE" height="Ti.UI.SIZE" left="10">
                            <Label bindId="Lbl3" Id="Lbl3" color="black" ></Label>
                        </View>
                    </View>
                </ItemTemplate>
            </Templates>
            <ListSection>
                <ListItem Lbl1:text="hello" Lbl2:text="how are you?" Lbl3:text="I am fine" height='70'/>
            </ListSection>
        </ListView>
    </Window>
</Alloy>

Solution

  • it seems a titanium bug.. open a ticket in JIRA.. Jira Bug Report