List of usage examples for android.app ProgressDialog setCancelable
public void setCancelable(boolean flag)
From source file:at.ac.uniklu.mobile.sportal.DashboardLogoutProgressDialogFragment.java
@Override public Dialog onCreateDialog(Bundle savedInstanceState) { ProgressDialog d = new ProgressDialog(getActivity()); d.setIndeterminate(true);//from w w w . j a v a 2 s . c o m d.setCancelable(false); d.setMessage(getString(R.string.work_logout)); return d; }
From source file:org.totschnig.myexpenses.dialog.ProgressDialogFragment.java
@Override public Dialog onCreateDialog(Bundle savedInstanceState) { final ProgressDialog dialog = new ProgressDialog(getActivity()); dialog.setMessage(getString(getArguments().getInt("message"))); dialog.setIndeterminate(true);// www . j a va 2 s .c o m dialog.setCancelable(false); // Disable the back button OnKeyListener keyListener = new OnKeyListener() { @Override public boolean onKey(DialogInterface dialog, int keyCode, KeyEvent event) { if (keyCode == KeyEvent.KEYCODE_BACK) { return true; } return false; } }; dialog.setOnKeyListener(keyListener); return dialog; }
From source file:com.example.levelup.core.app.ProgressFragment.java
@Override public Dialog onCreateDialog(Bundle savedInstanceState) { ProgressDialog progressDialog = new ProgressDialog(getActivity()); progressDialog.setIndeterminate(true); progressDialog.setCancelable(mLoaderId != LOADER_ID_NOT_SPECIFIED); progressDialog.setTitle(mTitle);/*w w w . j av a 2s . c o m*/ progressDialog.setMessage(getText(mMessage)); if (mLoaderId != LOADER_ID_NOT_SPECIFIED) { progressDialog.setOnCancelListener(new OnCancelListener() { @Override public void onCancel(DialogInterface dialog) { getLoaderManager().destroyLoader(mLoaderId); } }); } return progressDialog; }
From source file:fr.eoit.activity.LocationManagementActivity.java
@Override protected void onResume() { super.onResume(); if (!standingUpdated) { ProgressDialog waitDialog = new ProgressDialog(this); waitDialog.setCancelable(true); waitDialog.setMessage(getString(R.string.retreiving_standing)); waitDialog.show();/*from www . ja v a 2 s . com*/ new UpdateStandingAsyncTask(waitDialog).execute(this); standingUpdated = true; } }
From source file:org.puder.trs80.InitialSetupDialogFragment.java
@Override public Dialog onCreateDialog(Bundle savedInstanceState) { ProgressDialog progressDialog = new ProgressDialog(getActivity()); progressDialog.setCancelable(false); progressDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER); return progressDialog; }
From source file:net.sourceforge.servestream.utils.LoadingDialog.java
@Override public Dialog onCreateDialog(Bundle savedInstanceState) { // Use the Builder class for convenient dialog construction ProgressDialog loadingDialog = null; loadingDialog = new ProgressDialog(getActivity()); loadingDialog.setMessage(mDialogText); loadingDialog.setCancelable(true); loadingDialog.setOnCancelListener(this); return loadingDialog; }
From source file:id.nci.stm_9.ProgressDialogFragment.java
/** * Creates dialog// w ww .j a v a2 s.c o m */ @Override public Dialog onCreateDialog(Bundle savedInstanceState) { Activity activity = getActivity(); ProgressDialog dialog = new ProgressDialog(activity); dialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL); dialog.setCancelable(false); dialog.setCanceledOnTouchOutside(false); int messageId = getArguments().getInt(ARG_MESSAGE_ID); int style = getArguments().getInt(ARG_STYLE); dialog.setMessage(getString(messageId)); dialog.setProgressStyle(style); // Disable the back button OnKeyListener keyListener = new OnKeyListener() { @Override public boolean onKey(DialogInterface dialog, int keyCode, KeyEvent event) { if (keyCode == KeyEvent.KEYCODE_BACK) { return true; } return false; } }; dialog.setOnKeyListener(keyListener); return dialog; }
From source file:org.alfresco.mobile.android.ui.fragments.WaitingDialogFragment.java
public Dialog onCreateDialog(final Bundle savedInstanceState) { if (getArguments() != null) { titleId = getArguments().getInt(ARGUMENT_TITLEID); messageId = getArguments().getInt(ARGUMENT_MESSAGEID); isCancelable = getArguments().getBoolean(ARGUMENT_CANCELABLE); }//from w w w . j a v a 2 s. c om final ProgressDialog dialog = new ProgressDialog(getActivity()); dialog.setTitle(titleId); dialog.setMessage(getString(messageId)); dialog.setIndeterminate(true); dialog.setCancelable(isCancelable); return dialog; }
From source file:org.cvasilak.jboss.mobile.app.fragments.dialogs.ProgressDialogFragment.java
@Override public Dialog onCreateDialog(Bundle savedInstanceState) { ProgressDialog dialog = new ProgressDialog(getActivity()); dialog.setMessage(getActivity().getString(getArguments().getInt("message"))); dialog.setIndeterminate(true);/*from www. j av a 2 s. c o m*/ dialog.setCancelable(false); // Disable the back button DialogInterface.OnKeyListener keyListener = new DialogInterface.OnKeyListener() { @Override public boolean onKey(DialogInterface dialog, int keyCode, KeyEvent event) { return (keyCode == KeyEvent.KEYCODE_BACK); } }; dialog.setOnKeyListener(keyListener); return dialog; }
From source file:org.pixmob.freemobile.netstat.ui.ExportDialogFragment.java
@Override public Dialog onCreateDialog(Bundle savedInstanceState) { final ProgressDialog dialog = new ProgressDialog(getActivity()); dialog.setMessage(getString(R.string.exporting_data)); dialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL); dialog.setIndeterminate(true);// w w w . j av a 2s . c o m dialog.setCancelable(false); return dialog; }