0
我在xamarin android中使用線程和進度條。我正在使用下面的代碼來取得進展。但是線程完成後進度條仍然顯示。 誰能幫我解決此問題:進度條和線程在xamarin android
ProgressBar probar=view.FindViewById<ProgressBar>(Resource.Id.progressBar1);
probar.Visibility = ViewStates.Invisible;
Button btnref = view.FindViewById<Button>(Resource.Id.btnrefresh);
btnref.Click += delegate {
probar.Visibility = ViewStates.Visible;
System.Threading.ThreadStart th = new System.Threading.ThreadStart(imagesetting);
Thread myThread = new Thread(th);
myThread.Start();
probar.Visibility = ViewStates.Invisible;
};
private void imagesetting() {
string uri = "example.com/xxx.svc" + Vid + "";
-----
}
由於事先 ManthiramÇ
泰爾嗨結束隱藏probar,它正在爲me.Thank你的幫助。 –