你能幫我解決以下問題嗎? 我有一些代碼:活動不變
button.Click += (sender, e) => Search_Click();
....
void Search_Click()
{
// here i'am trying to clear some ListView
var list = FindViewById<ListView> (Resource.Id.terminalsList);
list.Adapter = new ArrayAdapter<string>(this, Android.Resource.Layout.SimpleListItem1, new List<string>());
// here i am trying to show ProgressDialog
ProgressDialog progress = new ProgressDialog(this);
progress.SetMessage("Wait while loading...");
progress.Show();
// but here i haven't ProgressDialog and clear ListView yet
......
// another code
}
但這段代碼不能正常工作。此代碼在Search_Click方法完成後執行,但我希望此代碼立即執行。如何執行此操作?
在此先感謝
謝謝!有用! – Junior222