Code example for ProgressDialog

Methods: cancel

0
			switch(msg.what) { 
				case SET_PROGRESS: 
					mDialog.setMessage((String)msg.obj); 
					break; 
				case FINISH_PROGRESS: 
					mDialog.cancel(); 
					Toast.makeText(ApplicationBackup.this,  
								   "Applications have been backed up",  
								   Toast.LENGTH_SHORT).show(); 
					break; 
			} 
		} 
	}; 
 
	@Override 
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		requestWindowFeature(Window.FEATURE_NO_TITLE);
		setContentView(R.layout.backup_layout);
				 
		mAppLabel = (TextView)findViewById(R.id.backup_label);