use of android.app.ProgressDialog in project Trello-Android by chrisHoekstra.
the class MainActivity method onCreateDialog.
@Override
protected Dialog onCreateDialog(int id) {
switch(id) {
case DIALOG_PROGRESS:
ProgressDialog dialog = new ProgressDialog(this);
dialog.setCustomTitle(null);
dialog.setMessage(getString(R.string.loading));
dialog.setIndeterminate(true);
dialog.setCancelable(false);
return dialog;
case DIALOG_LOGIN_ERROR:
return new AlertDialog.Builder(this).setTitle(R.string.error).setMessage(getResources().getString(R.string.login_error_message)).setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int whichButton) {
dialog.dismiss();
}
}).create();
}
return super.onCreateDialog(id);
}
use of android.app.ProgressDialog in project TakePhoto by crazycodeboy.
the class TUtils method showProgressDialog.
/**
* 显示圆形进度对话框
*
* @author JPH
* Date 2014-12-12 下午7:04:09
* @param activity
* @param progressTitle
* 显示的标题
* @return
*/
public static ProgressDialog showProgressDialog(final Activity activity, String... progressTitle) {
if (activity == null || activity.isFinishing())
return null;
String title = activity.getResources().getString(R.string.tip_tips);
if (progressTitle != null && progressTitle.length > 0)
title = progressTitle[0];
ProgressDialog progressDialog = new ProgressDialog(activity);
progressDialog.setTitle(title);
progressDialog.setCancelable(false);
progressDialog.show();
return progressDialog;
}
use of android.app.ProgressDialog in project c-geo by just-radovan.
the class cgMapOverlay method onTap.
@Override
public boolean onTap(int index) {
try {
if (items.size() <= index) {
return false;
}
if (waitDialog == null) {
waitDialog = new ProgressDialog(context);
waitDialog.setMessage("loading details...");
waitDialog.setCancelable(false);
}
waitDialog.show();
CacheOverlayItemImpl item = items.get(index);
cgCoord coordinate = item.getCoord();
if (coordinate.type != null && coordinate.type.equalsIgnoreCase("cache") == true && coordinate.geocode != null && coordinate.geocode.length() > 0) {
Intent popupIntent = new Intent(context, cgeopopup.class);
popupIntent.putExtra("fromdetail", fromDetail);
popupIntent.putExtra("geocode", coordinate.geocode);
context.startActivity(popupIntent);
} else if (coordinate.type != null && coordinate.type.equalsIgnoreCase("waypoint") == true && coordinate.id != null && coordinate.id > 0) {
Intent popupIntent = new Intent(context, cgeowaypoint.class);
popupIntent.putExtra("waypoint", coordinate.id);
popupIntent.putExtra("geocode", coordinate.geocode);
context.startActivity(popupIntent);
} else {
waitDialog.dismiss();
return false;
}
waitDialog.dismiss();
} catch (Exception e) {
Log.e(cgSettings.tag, "cgMapOverlay.onTap: " + e.toString());
}
return false;
}
use of android.app.ProgressDialog in project k-9 by k9mail.
the class ProgressDialogFragment method onCreateDialog.
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
Bundle args = getArguments();
String title = args.getString(ARG_TITLE);
String message = args.getString(ARG_MESSAGE);
ProgressDialog dialog = new ProgressDialog(getActivity());
dialog.setIndeterminate(true);
dialog.setTitle(title);
dialog.setMessage(message);
return dialog;
}
use of android.app.ProgressDialog in project qksms by moezbhatti.
the class QKActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
mRes = getResources();
// set the preferences if they haven't been set. this method takes care of that logic for us
getPrefs();
mProgressDialog = new ProgressDialog(this);
mProgressDialog.setIndeterminate(true);
mProgressDialog.setCancelable(false);
LiveViewManager.registerView(QKPreference.TINTED_STATUS, this, key -> {
mStatusTintEnabled = QKPreferences.getBoolean(QKPreference.TINTED_STATUS) && Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP;
});
LiveViewManager.registerView(QKPreference.TINTED_NAV, this, key -> {
mNavigationTintEnabled = QKPreferences.getBoolean(QKPreference.TINTED_NAV) && Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP;
});
if (Build.VERSION.SDK_INT >= 21) {
mRecentsIcon = BitmapFactory.decodeResource(getResources(), R.mipmap.ic_launcher);
LiveViewManager.registerView(QKPreference.THEME, this, key -> {
ActivityManager.TaskDescription taskDesc = new ActivityManager.TaskDescription(getString(R.string.app_name), mRecentsIcon, ThemeManager.getColor());
setTaskDescription(taskDesc);
});
}
}
Aggregations