List of usage examples for android.app ProgressDialog STYLE_HORIZONTAL
int STYLE_HORIZONTAL
To view the source code for android.app ProgressDialog STYLE_HORIZONTAL.
Click Source Link
From source file:com.dmsl.anyplace.tasks.UploadRSSLogTask.java
@Override protected void onPreExecute() { dialog = new ProgressDialog(context); dialog.setMax(100);/*from www . j av a 2s . c o m*/ dialog.setMessage("Uploading file ..."); dialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL); dialog.setCancelable(true); dialog.setCanceledOnTouchOutside(false); dialog.setOnCancelListener(new DialogInterface.OnCancelListener() { @Override public void onCancel(DialogInterface dialog) { httppost.abort(); } }); dialog.show(); }
From source file:com.ririjin.adminmobile.fragment.UpdateImageFragment.java
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { // TODO Auto-generated method stub View rootView = inflater.inflate(R.layout.upload_image_fragment, container, false);// ? uploadDialog = new ProgressDialog(getActivity()); // 100//from w ww . ja v a2 s. c om uploadDialog.setMax(100); // ?STYLE_HORIZONTAL uploadDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL); uploadDialog.setTitle("??"); BaoxianAlbumBtn = (Button) rootView.findViewById(R.id.baoxian_album); BaoxianAlbumBtn = (Button) rootView.findViewById(R.id.baoxian_album); BaoxianCameraBtn = (Button) rootView.findViewById(R.id.baoxian_camera); BaoxianCheckBox = (CheckBox) rootView.findViewById(R.id.baoxian_check); BaoxianProgeressLinear = (LinearLayout) rootView.findViewById(R.id.baoxian_progress_linear); CheliangzhaopianAlbumBtn = (Button) rootView.findViewById(R.id.cheliangzhaopian_album); CheliangzhaopianCameraBtn = (Button) rootView.findViewById(R.id.cheliangzhaopian_camera); CheliangzhaopianCheckBox = (CheckBox) rootView.findViewById(R.id.cheliangzhaopian_check); ChepaiAlbumBtn = (Button) rootView.findViewById(R.id.chepaihaozhaopian_album); ChepaiCameraBtn = (Button) rootView.findViewById(R.id.chepaihaozhaopian_camera); ChepaiCheckBox = (CheckBox) rootView.findViewById(R.id.chepaihao_check); DengjizhengAlbumBtn = (Button) rootView.findViewById(R.id.dengjizhengzhaopian_album); DengjizhengCameraBtn = (Button) rootView.findViewById(R.id.dengjizhengzhaopian_camera); DengjizhengCheckBox = (CheckBox) rootView.findViewById(R.id.dengjizheng_check); FapiaoAlbumBtn = (Button) rootView.findViewById(R.id.gouchefapiao_album); FapiaoCameraBtn = (Button) rootView.findViewById(R.id.gouchefapiao_camera); FapiaoCheckBox = (CheckBox) rootView.findViewById(R.id.gouchefapiao_check); JianchebaogaoAlbumBtn = (Button) rootView.findViewById(R.id.jianchebaogao_album); JianchebaogaoCameraBtn = (Button) rootView.findViewById(R.id.jianchebaogao_camera); JianchebaogaoCheckBox = (CheckBox) rootView.findViewById(R.id.jianchebaogao_check); ShenfenzhengAlbumBtn = (Button) rootView.findViewById(R.id.shenfenzheng_album); ShenfenzhengCameraBtn = (Button) rootView.findViewById(R.id.shenfenzheng_camera); ShenfenzhengCheckBox = (CheckBox) rootView.findViewById(R.id.shenfenzheng_check); ShenqingbiaoAlbumBtn = (Button) rootView.findViewById(R.id.shenqingbiaozhaopian_album); ShenqingbiaoCameraBtn = (Button) rootView.findViewById(R.id.shenqingbiaozhaopian_camera); ShenqingbiaoCheckBox = (CheckBox) rootView.findViewById(R.id.shenqingbiao_check); XingshibenAlbumBtn = (Button) rootView.findViewById(R.id.xingshiben_album); XingshibenCameraBtn = (Button) rootView.findViewById(R.id.xingshiben_camera); XingshibenCheckBox = (CheckBox) rootView.findViewById(R.id.xingshiben_check); DoudihetongAlbumBtn = (Button) rootView.findViewById(R.id.doudihetong_album); DoudihetongCameraBtn = (Button) rootView.findViewById(R.id.doudihetong_camera); DoudihetongCheckBox = (CheckBox) rootView.findViewById(R.id.doudihetong_check); HuigouhetongAlbumBtn = (Button) rootView.findViewById(R.id.huigouhetong_album); HuigouhetongCameraBtn = (Button) rootView.findViewById(R.id.huigouhetong_camera); HuigouhetongCheckBox = (CheckBox) rootView.findViewById(R.id.huigouhetong_check); BackButton.setVisibility(View.VISIBLE); BaoxianAlbumBtn.setOnClickListener(listener); BaoxianCameraBtn.setOnClickListener(listener); CheliangzhaopianAlbumBtn.setOnClickListener(listener); CheliangzhaopianCameraBtn.setOnClickListener(listener); ChepaiAlbumBtn.setOnClickListener(listener); ChepaiCameraBtn.setOnClickListener(listener); DengjizhengAlbumBtn.setOnClickListener(listener); DengjizhengCameraBtn.setOnClickListener(listener); FapiaoAlbumBtn.setOnClickListener(listener); FapiaoCameraBtn.setOnClickListener(listener); JianchebaogaoAlbumBtn.setOnClickListener(listener); JianchebaogaoCameraBtn.setOnClickListener(listener); ShenfenzhengAlbumBtn.setOnClickListener(listener); ShenfenzhengCameraBtn.setOnClickListener(listener); ShenqingbiaoAlbumBtn.setOnClickListener(listener); ShenqingbiaoCameraBtn.setOnClickListener(listener); XingshibenAlbumBtn.setOnClickListener(listener); XingshibenCameraBtn.setOnClickListener(listener); DoudihetongAlbumBtn.setOnClickListener(listener); DoudihetongCameraBtn.setOnClickListener(listener); HuigouhetongAlbumBtn.setOnClickListener(listener); HuigouhetongCameraBtn.setOnClickListener(listener); return rootView; }
From source file:com.gmail.altakey.lucene.AsyncImageLoader.java
protected void onPreExecute() { Context context = this.view.getContext(); this.httpClient = AndroidHttpClient.newInstance(this.getUserAgent()); this.oomMessage = Toast.makeText(context, R.string.toast_out_of_memory, Toast.LENGTH_SHORT); this.progress = new ProgressDialog(context); this.progress.setTitle(context.getString(R.string.dialog_loading_title)); this.progress.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL); this.progress.setMessage(context.getString(R.string.dialog_loading_message)); this.progress.show(); ImageUnloader.unload(this.view); }
From source file:com.ririjin.adminmobile.fragment.UploadImageFragment.java
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { // TODO Auto-generated method stub View rootView = inflater.inflate(R.layout.upload_image_fragment, container, false);// ? uploadDialog = new ProgressDialog(getActivity()); // 100/*from w w w .ja va2 s. co m*/ uploadDialog.setMax(100); // ?STYLE_HORIZONTAL uploadDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL); uploadDialog.setTitle("??"); BaoxianAlbumBtn = (Button) rootView.findViewById(R.id.baoxian_album); BaoxianCameraBtn = (Button) rootView.findViewById(R.id.baoxian_camera); BaoxianCheckBox = (CheckBox) rootView.findViewById(R.id.baoxian_check); BaoxianProgeressLinear = (LinearLayout) rootView.findViewById(R.id.baoxian_progress_linear); CheliangzhaopianAlbumBtn = (Button) rootView.findViewById(R.id.cheliangzhaopian_album); CheliangzhaopianCameraBtn = (Button) rootView.findViewById(R.id.cheliangzhaopian_camera); CheliangzhaopianCheckBox = (CheckBox) rootView.findViewById(R.id.cheliangzhaopian_check); ChepaiAlbumBtn = (Button) rootView.findViewById(R.id.chepaihaozhaopian_album); ChepaiCameraBtn = (Button) rootView.findViewById(R.id.chepaihaozhaopian_camera); ChepaiCheckBox = (CheckBox) rootView.findViewById(R.id.chepaihao_check); DengjizhengAlbumBtn = (Button) rootView.findViewById(R.id.dengjizhengzhaopian_album); DengjizhengCameraBtn = (Button) rootView.findViewById(R.id.dengjizhengzhaopian_camera); DengjizhengCheckBox = (CheckBox) rootView.findViewById(R.id.dengjizheng_check); FapiaoAlbumBtn = (Button) rootView.findViewById(R.id.gouchefapiao_album); FapiaoCameraBtn = (Button) rootView.findViewById(R.id.gouchefapiao_camera); FapiaoCheckBox = (CheckBox) rootView.findViewById(R.id.gouchefapiao_check); JianchebaogaoAlbumBtn = (Button) rootView.findViewById(R.id.jianchebaogao_album); JianchebaogaoCameraBtn = (Button) rootView.findViewById(R.id.jianchebaogao_camera); JianchebaogaoCheckBox = (CheckBox) rootView.findViewById(R.id.jianchebaogao_check); ShenfenzhengAlbumBtn = (Button) rootView.findViewById(R.id.shenfenzheng_album); ShenfenzhengCameraBtn = (Button) rootView.findViewById(R.id.shenfenzheng_camera); ShenfenzhengCheckBox = (CheckBox) rootView.findViewById(R.id.shenfenzheng_check); ShenqingbiaoAlbumBtn = (Button) rootView.findViewById(R.id.shenqingbiaozhaopian_album); ShenqingbiaoCameraBtn = (Button) rootView.findViewById(R.id.shenqingbiaozhaopian_camera); ShenqingbiaoCheckBox = (CheckBox) rootView.findViewById(R.id.shenqingbiao_check); XingshibenAlbumBtn = (Button) rootView.findViewById(R.id.xingshiben_album); XingshibenCameraBtn = (Button) rootView.findViewById(R.id.xingshiben_camera); XingshibenCheckBox = (CheckBox) rootView.findViewById(R.id.xingshiben_check); DoudihetongAlbumBtn = (Button) rootView.findViewById(R.id.doudihetong_album); DoudihetongCameraBtn = (Button) rootView.findViewById(R.id.doudihetong_camera); DoudihetongCheckBox = (CheckBox) rootView.findViewById(R.id.doudihetong_check); HuigouhetongAlbumBtn = (Button) rootView.findViewById(R.id.huigouhetong_album); HuigouhetongCameraBtn = (Button) rootView.findViewById(R.id.huigouhetong_camera); HuigouhetongCheckBox = (CheckBox) rootView.findViewById(R.id.huigouhetong_check); BackButton.setVisibility(View.VISIBLE); BaoxianAlbumBtn.setOnClickListener(listener); BaoxianCameraBtn.setOnClickListener(listener); CheliangzhaopianAlbumBtn.setOnClickListener(listener); CheliangzhaopianCameraBtn.setOnClickListener(listener); ChepaiAlbumBtn.setOnClickListener(listener); ChepaiCameraBtn.setOnClickListener(listener); DengjizhengAlbumBtn.setOnClickListener(listener); DengjizhengCameraBtn.setOnClickListener(listener); FapiaoAlbumBtn.setOnClickListener(listener); FapiaoCameraBtn.setOnClickListener(listener); JianchebaogaoAlbumBtn.setOnClickListener(listener); JianchebaogaoCameraBtn.setOnClickListener(listener); ShenfenzhengAlbumBtn.setOnClickListener(listener); ShenfenzhengCameraBtn.setOnClickListener(listener); ShenqingbiaoAlbumBtn.setOnClickListener(listener); ShenqingbiaoCameraBtn.setOnClickListener(listener); XingshibenAlbumBtn.setOnClickListener(listener); XingshibenCameraBtn.setOnClickListener(listener); DoudihetongAlbumBtn.setOnClickListener(listener); DoudihetongCameraBtn.setOnClickListener(listener); HuigouhetongAlbumBtn.setOnClickListener(listener); HuigouhetongCameraBtn.setOnClickListener(listener); return rootView; }
From source file:uk.ac.ucl.excites.sapelli.collector.util.AsyncDownloader.java
private AsyncDownloader(Context context, File downloadFolder, Callback callback) { if (callback == null) throw new NullPointerException("Callback cannot be null!"); this.context = context; this.callback = callback; // Download file in folder /Downloads/timestamp-filename downloadedFile = new File(downloadFolder.getAbsolutePath() + File.separator + (System.currentTimeMillis() / 1000) + '.' + TEMP_FILE_EXTENSION); // Set-up progress dialog: progressDialog = new ProgressDialog(context); progressDialog.setMessage(context.getString(R.string.downloading)); progressDialog.setIndeterminate(false); progressDialog.setMax(100);/*from www .j ava 2 s.com*/ progressDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL); progressDialog.setCancelable(true); }
From source file:com.alphabetbloc.accessmrs.ui.admin.BaseAdminActivity.java
private void showProgressDialog() { SyncManager.sSyncStep.set(0);/*from w ww. j a v a2s . c o m*/ SyncManager.sLoopProgress.set(0); SyncManager.sLoopCount.set(0); mSyncActiveDialog = new ProgressDialog(this); mSyncActiveDialog.setIcon(android.R.drawable.ic_dialog_info); mSyncActiveDialog.setTitle(getString(R.string.sync_in_progress_title)); mSyncActiveDialog.setMessage(getString(R.string.sync_in_progress)); mSyncActiveDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL); mSyncActiveDialog.setCancelable(false); mSyncActiveDialog.setProgress(0); mSyncActiveDialog.show(); }
From source file:org.thialfihar.android.apg.ui.UploadKeyActivity.java
private void uploadKey() { // Send all information needed to service to upload key in other thread Intent intent = new Intent(this, ApgIntentService.class); intent.setAction(ApgIntentService.ACTION_UPLOAD_KEYRING); // set data uri as path to keyring Uri blobUri = ApgContract.KeyRingData.buildPublicKeyRingUri(mDataUri); intent.setData(blobUri);// w w w . ja v a 2 s . c om // fill values for this action Bundle data = new Bundle(); String server = (String) mKeyserverSpinner.getSelectedItem(); data.putString(ApgIntentService.UPLOAD_KEY_SERVER, server); intent.putExtra(ApgIntentService.EXTRA_DATA, data); // Message is received after uploading is done in ApgService ApgIntentServiceHandler saveHandler = new ApgIntentServiceHandler(this, getString(R.string.progress_exporting), ProgressDialog.STYLE_HORIZONTAL) { public void handleMessage(Message message) { // handle messages by standard ApgHandler first super.handleMessage(message); if (message.arg1 == ApgIntentServiceHandler.MESSAGE_OKAY) { Toast.makeText(UploadKeyActivity.this, R.string.key_send_success, Toast.LENGTH_SHORT).show(); finish(); } } }; // Create a new Messenger for the communication back Messenger messenger = new Messenger(saveHandler); intent.putExtra(ApgIntentService.EXTRA_MESSENGER, messenger); // show progress dialog saveHandler.showProgressDialog(this); // start service with intent startService(intent); }
From source file:org.sufficientlysecure.keychain.ui.UploadKeyActivity.java
private void uploadKey() { // Send all information needed to service to upload key in other thread Intent intent = new Intent(this, KeychainIntentService.class); intent.setAction(KeychainIntentService.ACTION_UPLOAD_KEYRING); // set data uri as path to keyring Uri blobUri = KeychainContract.KeyRingData.buildPublicKeyRingUri(mDataUri); intent.setData(blobUri);/* w w w.j av a2 s. c o m*/ // fill values for this action Bundle data = new Bundle(); String server = (String) mKeyServerSpinner.getSelectedItem(); data.putString(KeychainIntentService.UPLOAD_KEY_SERVER, server); intent.putExtra(KeychainIntentService.EXTRA_DATA, data); // Message is received after uploading is done in KeychainIntentService KeychainIntentServiceHandler saveHandler = new KeychainIntentServiceHandler(this, getString(R.string.progress_exporting), ProgressDialog.STYLE_HORIZONTAL) { public void handleMessage(Message message) { // handle messages by standard KeychainIntentServiceHandler first super.handleMessage(message); if (message.arg1 == KeychainIntentServiceHandler.MESSAGE_OKAY) { Toast.makeText(UploadKeyActivity.this, R.string.key_send_success, Toast.LENGTH_SHORT).show(); finish(); } } }; // Create a new Messenger for the communication back Messenger messenger = new Messenger(saveHandler); intent.putExtra(KeychainIntentService.EXTRA_MESSENGER, messenger); // show progress dialog saveHandler.showProgressDialog(this); // start service with intent startService(intent); }
From source file:de.Maxr1998.xposed.maxlock.ui.settings.appslist.AppsListFragment.java
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { rootView = new RelativeLayout(getActivity()); if (finalList == null || finalList.isEmpty()) { progressDialog = new ProgressDialog(getActivity()); progressDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL); progressDialog.setCanceledOnTouchOutside(false); progressDialog.setCancelable(true); progressDialog.setOnCancelListener(new DialogInterface.OnCancelListener() { @Override//from w ww . j ava2 s . c o m public void onCancel(DialogInterface dialogInterface) { task.cancel(true); } }); progressDialog.show(); if (task == null) task = new SetupAppList(); if (!task.getStatus().equals(AsyncTask.Status.RUNNING)) task.execute(); } else { setup(); } return rootView; }
From source file:com.fortysevendeg.labs.bbc.rest.android.activities.BeerActivity.java
/** * Update beer on server// ww w . jav a 2 s.co m */ private void updateBeer() { if (TextUtils.isEmpty(etAlcohol.getText().toString()) || TextUtils.isEmpty(etName.getText().toString())) { Toast.makeText(BeerActivity.this, R.string.fieldsEmpty, Toast.LENGTH_SHORT).show(); return; } final ProgressDialog progressDialog = new ProgressDialog(this); progressDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL); progressDialog.setMessage(getString(R.string.connecting)); progressDialog.setIndeterminate(true); progressDialog.setCancelable(false); progressDialog.show(); BeerRequest beerRequest = new BeerRequest(); beerRequest.setAvb(Double.parseDouble(etAlcohol.getText().toString())); beerRequest.setName(etName.getText().toString()); beerRequest.setDescription(etDescription.getText().toString()); APIService.get().updateBeer(beerResponseEdit.getId(), beerRequest, new ContextAwareAPIDelegate<BeerResponse>(this, BeerResponse.class) { @Override public void onResults(BeerResponse beerResponse) { progressDialog.dismiss(); Toast.makeText(BeerActivity.this, R.string.beerSaved, Toast.LENGTH_SHORT).show(); setResult(RESULT_OK); finish(); } @Override public void onError(Throwable e) { progressDialog.dismiss(); Toast.makeText(BeerActivity.this, R.string.error, Toast.LENGTH_SHORT).show(); } }); }