use of com.fastaccess.ui.widgets.dialog.ProgressDialogFragment in project FastHub by k0shk0sh.
the class BaseActivity method hideProgress.
@Override
public void hideProgress() {
ProgressDialogFragment fragment = (ProgressDialogFragment) AppHelper.getFragmentByTag(getSupportFragmentManager(), ProgressDialogFragment.TAG);
if (fragment != null) {
isProgressShowing = false;
fragment.dismiss();
}
}
use of com.fastaccess.ui.widgets.dialog.ProgressDialogFragment in project FastHub by k0shk0sh.
the class BaseActivity method showProgress.
private void showProgress(int resId, boolean cancelable) {
String msg = getString(R.string.in_progress);
if (resId != 0) {
msg = getString(resId);
}
if (!isProgressShowing && !isFinishing()) {
ProgressDialogFragment fragment = (ProgressDialogFragment) AppHelper.getFragmentByTag(getSupportFragmentManager(), ProgressDialogFragment.TAG);
if (fragment == null) {
isProgressShowing = true;
fragment = ProgressDialogFragment.newInstance(msg, cancelable);
fragment.show(getSupportFragmentManager(), ProgressDialogFragment.TAG);
}
}
}
Aggregations