Search in sources :

Example 26 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 27 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 28 with ProgressDialog

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

Example 29 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)

Example 30 with ProgressDialog

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();
}
Also used : AlertDialog(android.app.AlertDialog) EditText(android.widget.EditText) DialogInterface(android.content.DialogInterface) Handler(android.os.Handler) ProgressDialog(android.app.ProgressDialog) PasswordTransformationMethod(android.text.method.PasswordTransformationMethod) HandlerThread(android.os.HandlerThread) LinearLayout(android.widget.LinearLayout)

Aggregations

ProgressDialog (android.app.ProgressDialog)247 DialogInterface (android.content.DialogInterface)43 Intent (android.content.Intent)20 View (android.view.View)17 File (java.io.File)17 Handler (android.os.Handler)12 FrameLayout (android.widget.FrameLayout)12 TextView (android.widget.TextView)10 IOException (java.io.IOException)10 JSONObject (org.json.JSONObject)10 LinearLayout (android.widget.LinearLayout)9 ArrayList (java.util.ArrayList)9 SuppressLint (android.annotation.SuppressLint)8 Display (android.view.Display)8 Activity (android.app.Activity)7 Uri (android.net.Uri)7 AsyncTask (android.os.AsyncTask)7 Bundle (android.os.Bundle)6 KeyEvent (android.view.KeyEvent)6 ImageView (android.widget.ImageView)6