We are trying to show a table data on a listview. The data consists of 8 columns and around 50 rows.
In one second period approximatelly 8 update data comes.
(ie:update row2-column5 to something.)
Every time a new data comes, we are updating the dedicated cells and we call datasetchanged()
of the adapter
and this causes some performance and scrolling problems.
My question is:
What is the best way of showing stream data in Android using standard widgets?
You could try refreshing only the items that need updating. To do so, you will need the position of the data in the listview.
private void updateData(int position)
{
int firstItem = listView1.getFirstVisiblePosition();
View view = listView1.getChildAt(position - firstItem);
TextView tv = (TextView)view.findViewById(R.id.textview);
tv.setText("Example Text");
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With