Languages

Menu
Sites
Language
How to handle a TAU list with more than 50 items?

Hi,

I have a large number of list items (around 50 items) that are loaded using Ajax request when the page is shown. After that, I use:

snapListHelper = tau.helper.SnapListMarqueeStyle.create(list, {
	marqueeStyle : "endToEnd",
	iteration : "infinite",
	animate : "scale"
});
snapList = tau.widget.SnapListview(list);

but the gear performance slows down heavily.

I tried using Virtual List then apply the TAU styles above (marquee & scaleAnimation), but the styles were only applied to the initially loaded elements.

I also tried pagination with Ajax but that failed too for the same reason.

So, what's the best approach to handle a large number of list items in Tizen?

Thanks

Responses

3 Replies
André Reus

hi, What was the problem in Virtual List? I saw a example app with huge data in Virtual List sample ... Please see the TAUIComponents app in Tizen Studio Sample. 

page.addEventListener("pagebeforeshow", function() {
    	vlist = tau.widget.VirtualListview(elList, {
			dataLength: JSON_DATA.length,
			bufferSize: 40,
			scrollElement: "ui-scroller"
		});

		// Update listitem
		vlist.setListItemUpdater(function(elListItem, newIndex) {
			//TODO: Update listitem here
			var data =  JSON_DATA[newIndex];
			elListItem.innerHTML = '<span class="ui-li-text-main">' + data.NAME+'</span>';
		});
		// Draw child elements
		vlist.draw();
	});

 

Jafar Alnadaf

Hi André,

Thanks for your reply. I checked this example before and applied it, the problem is that I want to apply the styles and the animations that exist in the "SnapListMarqueeView" (scale animation, and marquee). but they are only applied to the pre-buffered elements of the virtual list.

André Reus

Yeah Jafar Alnadaf.. I understood your problem ....But without seeing other part of your code, it is tough to suggest anything .. And your problem may be in CSS conflict ! ( I guess)