我想开始一个ProgressDialog
何时onPreExecute()
被调用但它不起作用。
家庭活动.java
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
//switch condtion...
case R.id.buttontime :
new FlightListTask().execute("");
break:
}
public class FlightListTask extends AsyncTask<String,ArrayList<HashMap<String, String>>, ArrayList<HashMap<String, String>>> {
protected String onPreExecute(String temp) {
progresdialoglistview=ProgressDialog.show(HomeActivity.this, "", "Loading");
Log.e("onPreExecutive","called"+progresdialoglistview);
return temp;
}
@Override
protected ArrayList<HashMap<String, String>> doInBackground( String... params ) {
return flightlist;
}
protected void onPostExecute(ArrayList<HashMap<String, String>> flightList) {
// listview code....
}
}