Progress bar not moving
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开发者_如何学C).getTag();
Log.d("Progress",String.valueOf(vh.progress.getProgress()));
vh.progress.setProgress((int) prog[pro]);
}
});
getView() on your Adapter is probably creating a brand new row, since that's what it is supposed to do when you call getView() with a null second parameter.
You need to have a better scheme for retrieving the ProgressBar that you wish to update, taking into account that the ProgressBar may have been recycled to be displaying some other row's progress.
加载中,请稍侯......
精彩评论