Quantcast
Channel: Appcelerator Developer Center Q&A Tag Feed (template)
Viewing all articles
Browse latest Browse all 26

ListView Row Click - Reveal child element - Alloy

$
0
0

Hey all. I'm wondering if what I'm trying to do it possible. I am using Alloy and build a listview with a template. I am hoping that onItemclick of a listview item I can reveal a child element within that row (list item). I initially set the height of the view I want to reveal to 0 and then on click I want to show that item. I tried doing something like this as a test but it didn't work. Is something like this not possible? Any guidance is appreciated.

<ListView id="list" defaultItemTemplate="detailTemplate1" onItemclick="onItemClick">
function onItemClick(e) {
    var section = $.list.sections[e.sectionIndex];
    var item = section.getItemAt(e.itemIndex);
    item.children[0].height="100dp";
}

Viewing all articles
Browse latest Browse all 26

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>