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 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;
}
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);
});
}
}
use of android.app.ProgressDialog in project Bitocle by mthli.
the class SplashActivity method showSignInDialog.
private void showSignInDialog() {
AlertDialog.Builder builder = new AlertDialog.Builder(SplashActivity.this);
LinearLayout layout = (LinearLayout) getLayoutInflater().inflate(R.layout.splash_dialog, null);
final EditText userText = (EditText) layout.findViewById(R.id.splash_sign_in_dialog_username);
final EditText passText = (EditText) layout.findViewById(R.id.splash_sign_in_dialog_password);
passText.setTypeface(Typeface.DEFAULT);
passText.setTransformationMethod(new PasswordTransformationMethod());
builder.setView(layout);
builder.setPositiveButton(getString(R.string.splash_sign_in_dialog_ok), new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
username = userText.getText().toString();
password = passText.getText().toString();
if (username.length() == 0 || password.length() == 0) {
Toast.makeText(SplashActivity.this, R.string.splash_input_error, Toast.LENGTH_SHORT).show();
} else {
progress = new ProgressDialog(SplashActivity.this);
progress.setMessage(getString(R.string.splash_sign_in_authenticating));
progress.setCancelable(false);
progress.show();
HandlerThread thread = new HandlerThread(getString(R.string.splash_sign_in_thread));
thread.start();
Handler handler = new Handler(thread.getLooper());
handler.post(signInThread);
}
}
});
builder.setNegativeButton(getString(R.string.splash_sign_in_dialog_cancel), new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
/* Do nothing */
}
});
builder.show();
}
Aggregations