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 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 SeriesGuide by UweTrottmann.
the class SearchActivity method showProgressDialog.
private void showProgressDialog() {
if (progressDialog == null) {
progressDialog = new ProgressDialog(this);
progressDialog.setCancelable(false);
}
progressDialog.show();
}
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);
}
});
}
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;
}
Aggregations