示例#1
0
文件: D4.java 项目: sarekautowerke/D4
 @Override
 protected Dialog onCreateDialog(int id) {
   switch (id) {
     case PROGRESS_DIALOG:
       progressDialog = new ProgressDialog(D4.this);
       progressDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
       progressDialog.setMessage("Loading...");
       return progressDialog;
     default:
       return null;
   }
 }
示例#2
0
文件: D4.java 项目: sarekautowerke/D4
 @Override
 protected void onPrepareDialog(int id, Dialog dialog) {
   switch (id) {
     case PROGRESS_DIALOG:
       progressDialog.setProgress(0);
       progressThread = new ProgressThread(handler);
       progressThread.start();
   }
 }
示例#3
0
文件: D4.java 项目: sarekautowerke/D4
 @Override
 public void handleMessage(Message msg) {
   int total = msg.arg1;
   progressDialog.setProgress(total);
   if (total >= 100) {
     dismissDialog(PROGRESS_DIALOG);
     progressThread.setState(ProgressThread.STATE_DONE);
   }
 }