ProgressDialog
whenを起動したいのですonPreExecute()
が、動作しません。
Homeactivity.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....
}
}