protected override void OnResume()
{
base.OnResume();
ProgressDialog progressDialog1 = ProgressDialog.Show(Parent, "", "Please wait...",false);
new Thread(new ThreadStart(() => {
RunOnUiThread(() =>
{
try
{
string st="";
}
catch (System.Exception ex)
{
}
progressDialog1.Dismiss();
});
})).Start();
}
當我在try catch塊中放置一個斷點時,進度對話框不可見。但相同的代碼在按鈕點擊事件內工作良好。做任何人都面臨同樣的問題?Android在OnResume中顯示ProgressDialog()