这是我的代码原型:-
class something extends Activity
{
protected void onCreate(Bundle savedInstanceState)
{
String str = objectofanotherthing.execute("").get();
}
class anotherthing extends AsyncTask
{
ProgressDialog Dialog;
protected void onPreExecute()
{
Dialog = ProgressDialog.show(context, "Progressing", "Working on it,");
}
protected String doInBackground(String... params)
{
...
}
protected void onPostExecute(Integer result)
{
Dialog.dismiss();
}
}
}
当我执行我的代码时,我的程序似乎在 ProgressDialog.show 处停止,没有崩溃也没有错误。当我评论这部分时,程序执行得很好。我不确定可以做什么。谁能帮我这个。提前致谢。