Could you help me with following problem? I have some code:
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
}
But this code does not work properly. This code is perfomed after the Search_Click method finished but i want this code to be perfomed immediately.How can i do it?
thanks in advance