I have progress bar in every item inside my listview. When I tap an item on the list, another thread makes the progress bar move. For some reason the output says the progress bar is increasing but it’s not. Below is some of the code.
mHandler.post(new Runnable() {
public void run() {
ViewHolder vh = (ViewHolder) adapter.getView(pro, null, null).getTag();
Log.d("Progress",String.valueOf(vh.progress.getProgress()));
vh.progress.setProgress((int) prog[pro]);
}
});
getView()on yourAdapteris probably creating a brand new row, since that’s what it is supposed to do when you callgetView()with anullsecond parameter.You need to have a better scheme for retrieving the
ProgressBarthat you wish to update, taking into account that theProgressBarmay have been recycled to be displaying some other row’s progress.