listview('refresh') on android ICS 4.x makes list go blank. Phonegap.
Hey there,
Been using jquery mobile for a while now so i'm pretty sure this isn't a basic question.
I have a page with:
- <ul id="mylist"></ul>
When i get a array back from a succesful web service call i declare the list:
- $("#mylist").listview();
I then empty my listview as I am completely refreshing the data:
- $("#mylist").empty();
I then append to my list in a loop:
- $("#mylist").append('<li>test</li>');
Then once finished i refresh:
- $("#mylist").listview('refresh');
I have tested my code on Android 2.x, iOS and blackberry with phonegap and it works great.
BUT on Android 4.x (ICS). The list loads into the page fine, but second i run listview('refresh') the list becomes a blank white box.
From what i understand the listview('refresh') applies the formatting onto the list and adds any new items (but in my example it is blank so they are all new).
Anybody have any ideas about this?