2011-07-27 20 views
0

我在每個listview行中都有一個水平進度條。 當我選擇一行並上傳時,我正在向下滾動,當我回到我正在興奮的那一行時,進度條消失了(它不在屏幕上時保存狀態)。 我正在使用SimpleCursorAdapter和sqlite。 我已經看到了這個工作,像android市場應用程序,他們做得很好。 有什麼幫助嗎?我一直在這上幾天。如何在列表視圖中滾動時保持進度條狀態

+0

的問題是在你的getView()方法 – ingsaurabh

+0

我也使用bindview。我會很快發佈我的代碼。 – Codes12

回答

0

公共查看getView(最終詮釋的立場,觀點convertView,ViewGroup以及母公司){

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; 
} 
相關問題