0

我在每个列表视图行中有一个水平进度条。当我选择一行并上传时,我向下滚动,当我回到我正在上传的行时,进度条消失了(当它离开屏幕时它没有保存状态)。我正在使用 SimpleCursorAdapter 和 sqlite。我已经看到这个工作了,就像 android 市场应用程序一样,他们做得很好。有什么帮助吗?我一直在这几天。

4

1 回答 1

0
public View getView(final int position, View convertView, ViewGroup parent) {

    ProgressBar progressBar = (ProgressBar)view.findViewById(R.id.progressBar);
    Rect bounds = progressBar.getProgressDrawable().getBounds();

    ... do your work here

    //reset the bounds before return the view
    progressBar.getProgressDrawable().setBounds(bounds);

    return view;
}
于 2013-11-08T20:45:20.160 回答