use of android.app.ProgressDialog in project KeepScore by nolanlawson.
the class MainActivity method showProgressDialog.
private ProgressDialog showProgressDialog(int titleResId, int max) {
ProgressDialog progressDialog = new ProgressDialog(this);
progressDialog.setCancelable(false);
progressDialog.setTitle(titleResId);
progressDialog.setIndeterminate(false);
progressDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
progressDialog.setMax(max);
progressDialog.show();
return progressDialog;
}
use of android.app.ProgressDialog in project AndEngine by nicolasgramlich.
the class ActivityUtils method doAsync.
public static <T> void doAsync(final Context pContext, final CharSequence pTitle, final CharSequence pMessage, final AsyncCallable<T> pAsyncCallable, final Callback<T> pCallback, final Callback<Exception> pExceptionCallback) {
final ProgressDialog pd = ProgressDialog.show(pContext, pTitle, pMessage);
pAsyncCallable.call(new Callback<T>() {
@Override
public void onCallback(final T result) {
try {
pd.dismiss();
} catch (final Exception e) {
Debug.e("Error", e);
/* Nothing. */
}
pCallback.onCallback(result);
}
}, pExceptionCallback);
}
use of android.app.ProgressDialog in project Jota-Text-Editor-old by jiro-aqua.
the class TextLoadTask method onPreExecute.
@Override
protected void onPreExecute() {
super.onPreExecute();
if (mFileLoadListener != null) {
mFileLoadListener.onPreFileLoad();
}
mProgressDialog = new ProgressDialog(mActivity);
// mProgressDialog.setTitle(R.string.spinner_message);
mProgressDialog.setMessage(mActivity.getString(R.string.spinner_message));
mProgressDialog.setIndeterminate(true);
mProgressDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);
mProgressDialog.setCancelable(false);
mProgressDialog.show();
}
use of android.app.ProgressDialog in project Jota-Text-Editor-old by jiro-aqua.
the class TextSaveTask method onPreExecute.
@Override
protected void onPreExecute() {
super.onPreExecute();
if (mPreProc != null) {
mPreProc.run();
}
try {
mProgressDialog = new ProgressDialog(mActivity);
// mProgressDialog.setTitle(R.string.spinner_message);
mProgressDialog.setMessage(mActivity.getString(R.string.spinner_message));
mProgressDialog.setIndeterminate(true);
mProgressDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);
mProgressDialog.setCancelable(false);
mProgressDialog.show();
} catch (Exception e) {
mProgressDialog = null;
}
}
use of android.app.ProgressDialog in project superCleanMaster by joyoyao.
the class ProgressDialogFragment method onCreateDialog.
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
mIndeterminateDrawable = getArguments().getInt("indeterminateDrawable");
mMessage = getArguments().getString("message");
ProgressDialog mProgressDialog = new ProgressDialog(getActivity(), AlertDialog.THEME_HOLO_LIGHT);
if (mIndeterminateDrawable > 0) {
mProgressDialog.setIndeterminateDrawable(getActivity().getResources().getDrawable(mIndeterminateDrawable));
}
if (mMessage != null) {
mProgressDialog.setMessage(mMessage);
}
return mProgressDialog;
}
Aggregations