Search in sources :

Example 1 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 2 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 3 with ProgressDialog

use of android.app.ProgressDialog in project SeriesGuide by UweTrottmann.

the class SearchActivity method showProgressDialog.

private void showProgressDialog() {
    if (progressDialog == null) {
        progressDialog = new ProgressDialog(this);
        progressDialog.setCancelable(false);
    }
    progressDialog.show();
}
Also used : ProgressDialog(android.app.ProgressDialog)

Example 4 with ProgressDialog

use of android.app.ProgressDialog in project actor-platform by actorapp.

the class BaseActivity method execute.

// Executions
public <T> void execute(Command<T> cmd, int title, final CommandCallback<T> callback) {
    final ProgressDialog progressDialog = new ProgressDialog(this);
    progressDialog.setMessage(getString(title));
    progressDialog.setCancelable(false);
    progressDialog.setCanceledOnTouchOutside(false);
    progressDialog.show();
    cmd.start(new CommandCallback<T>() {

        @Override
        public void onResult(T res) {
            dismissDialog(progressDialog);
            callback.onResult(res);
        }

        @Override
        public void onError(Exception e) {
            dismissDialog(progressDialog);
            callback.onError(e);
        }
    });
}
Also used : ProgressDialog(android.app.ProgressDialog)

Example 5 with ProgressDialog

use of android.app.ProgressDialog in project actor-platform by actorapp.

the class BaseFragment method execute.

public <T> Promise<T> execute(Promise<T> promise, int title) {
    final ProgressDialog dialog = ProgressDialog.show(getContext(), "", getString(title), true, false);
    promise.then(new Consumer<T>() {

        @Override
        public void apply(T t) {
            dismissDialog(dialog);
        }
    }).failure(new Consumer<Exception>() {

        @Override
        public void apply(Exception e) {
            dismissDialog(dialog);
        }
    });
    return promise;
}
Also used : Consumer(im.actor.runtime.function.Consumer) ProgressDialog(android.app.ProgressDialog)

Aggregations

ProgressDialog (android.app.ProgressDialog)637 DialogInterface (android.content.DialogInterface)101 View (android.view.View)78 Intent (android.content.Intent)73 TextView (android.widget.TextView)62 IOException (java.io.IOException)33 ArrayList (java.util.ArrayList)32 ImageView (android.widget.ImageView)30 File (java.io.File)29 AlertDialog (android.app.AlertDialog)25 Context (android.content.Context)25 SuppressLint (android.annotation.SuppressLint)24 Bundle (android.os.Bundle)24 JSONObject (org.json.JSONObject)24 HashMap (java.util.HashMap)23 List (java.util.List)23 Handler (android.os.Handler)21 EditText (android.widget.EditText)21 Activity (android.app.Activity)19 RecyclerView (android.support.v7.widget.RecyclerView)18