示例#1
0
 public RestLocationTask(MainActivity mainActivity) {
   super();
   this.mainActivity = mainActivity;
   pd = new ProgressDialog(mainActivity);
   pd.setView(mainActivity.findViewById(R.layout.progressbar));
   pd.setMessage(R8Util.getResources().getString(R.string.doLocationWebSearch));
   pd.show();
 }
 @Override
 protected void onPreExecute() {
   // TODO Auto-generated method stub
   LayoutInflater vi = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
   View view = vi.inflate(R.layout.view_progress_dialog_background, null);
   ProgressBar pb = (ProgressBar) view.findViewById(R.id.progressBar);
   dialog.setView(pb);
   dialog.setMessage("Please wait");
   dialog.show();
 }