Languages

Menu
Sites
Language
How to refresh TAU listview properly?

Hello. 

I am creating app for Samsung Gear and I am using TAU library. 

I have a same problem like here (https://stackoverflow.com/questions/33848603/tizen-dynamic-list-not-scrollable-by-wheel) - when I want add items to listview, it stops being scrollable by watch-wheel. I've tried solve it by adding tau.widget.getInstance('overview-list').refresh(); and it solve my problem, but still the background of the selected item does not changing while scrolling (//imgup.cz/images/2018/12/26/feewf.png). 

What is the proper way to refresh TAU list?

Thank you very much. 

Edited by: David Novák on 25 Dec, 2018
View Selected Answer

Responses

5 Replies
David Novák

Thank you for your answer. I used this example from that site, but it didn't works for me. It returns Uncaught TypeError: listv.addItem is not a function to the console. I am using the last version of TAU 0.13.35. Don't you know where the problem might be?

 

<ul id="listvi" data-role="listview">
   <li><a href="#">Normal lists</a></li>
   <li><a href="#">Normal lists</a></li>
</ul>
<script>
   var element = document.getElementById("listvi"),
       listv = tau.widget.Listview(element);
   listv.addItem("<li>Test<div data-role='button' data-inline='true'>TEST</div></li>", 2);
</script>

 

Mark as answer
André Reus

Hi, I told to use this from that link 

   var element = document.getElementById("listvi"),
   listv = tau.widget.Listview(element);
   listv.refresh();
David Novák

Nice, now it works! Thank you very much for your help. :-)

Steven Brown

I'm also facing same problem but thanks for your guidance its really helpful discussion.