Search in sources :

Example 1 with ProgressDialogFragment

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();
    }
}
Also used : ProgressDialogFragment(com.fastaccess.ui.widgets.dialog.ProgressDialogFragment)

Example 2 with ProgressDialogFragment

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);
        }
    }
}
Also used : ProgressDialogFragment(com.fastaccess.ui.widgets.dialog.ProgressDialogFragment)

Aggregations

ProgressDialogFragment (com.fastaccess.ui.widgets.dialog.ProgressDialogFragment)2