Search in sources :

Example 41 with ProgressDialog

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);
}
Also used : DialogInterface(android.content.DialogInterface) ProgressDialog(android.app.ProgressDialog)

Example 42 with ProgressDialog

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;
}
Also used : ProgressDialog(android.app.ProgressDialog)

Example 43 with 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;
}
Also used : carnero.cgeo.cgCoord(carnero.cgeo.cgCoord) carnero.cgeo.cgeowaypoint(carnero.cgeo.cgeowaypoint) Intent(android.content.Intent) ProgressDialog(android.app.ProgressDialog) CacheOverlayItemImpl(carnero.cgeo.mapinterfaces.CacheOverlayItemImpl)

Example 44 with ProgressDialog

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;
}
Also used : Bundle(android.os.Bundle) ProgressDialog(android.app.ProgressDialog)

Example 45 with ProgressDialog

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);
        });
    }
}
Also used : ProgressDialog(android.app.ProgressDialog) ActivityManager(android.app.ActivityManager)

Aggregations

ProgressDialog (android.app.ProgressDialog)267 DialogInterface (android.content.DialogInterface)47 Intent (android.content.Intent)23 View (android.view.View)21 File (java.io.File)19 TextView (android.widget.TextView)13 SuppressLint (android.annotation.SuppressLint)12 Handler (android.os.Handler)12 FrameLayout (android.widget.FrameLayout)12 ArrayList (java.util.ArrayList)12 IOException (java.io.IOException)11 JSONObject (org.json.JSONObject)10 Uri (android.net.Uri)9 LinearLayout (android.widget.LinearLayout)9 OnCancelListener (android.content.DialogInterface.OnCancelListener)8 Display (android.view.Display)8 Activity (android.app.Activity)7 Dialog (android.app.Dialog)7 ImageView (android.widget.ImageView)7 List (java.util.List)7