Search in sources :

Example 11 with ProgressDialogFragment

use of com.wada811.android.dialogfragments.material.ProgressDialogFragment in project Android-DialogFragments by wada811.

the class LoaderSpinnerProgressDialogFragmentExamplesFragment method onLoadFinished.

@Override
public void onLoadFinished(Loader<Object> objectLoader, Object o) {
    Log.i(TAG, "onLoadFinished");
    getLoaderManager().destroyLoader(objectLoader.getId());
    Fragment fragment = getChildFragmentManager().findFragmentByTag(ProgressDialogFragment.TAG);
    if (fragment != null) {
        ProgressDialogFragment dialogFragment = (ProgressDialogFragment) fragment;
        dialogFragment.dismissAllowingStateLoss();
    }
}
Also used : ProgressDialogFragment(com.wada811.android.dialogfragments.material.ProgressDialogFragment) ProgressDialogFragment(com.wada811.android.dialogfragments.material.ProgressDialogFragment) Fragment(android.support.v4.app.Fragment) ListFragment(android.support.v4.app.ListFragment)

Example 12 with ProgressDialogFragment

use of com.wada811.android.dialogfragments.material.ProgressDialogFragment in project Android-DialogFragments by wada811.

the class LoaderSpinnerProgressDialogFragmentExamplesActivity method onLoadFinished.

@Override
public void onLoadFinished(Loader<Object> loader, Object o) {
    Log.i(TAG, "onLoadFinished");
    getSupportLoaderManager().destroyLoader(loader.getId());
    Fragment fragment = getSupportFragmentManager().findFragmentByTag(ProgressDialogFragment.TAG);
    if (fragment != null) {
        ProgressDialogFragment dialogFragment = (ProgressDialogFragment) fragment;
        dialogFragment.dismissAllowingStateLoss();
    }
}
Also used : ProgressDialogFragment(com.wada811.android.dialogfragments.traditional.ProgressDialogFragment) Fragment(android.support.v4.app.Fragment) ProgressDialogFragment(com.wada811.android.dialogfragments.traditional.ProgressDialogFragment)

Aggregations

Fragment (android.support.v4.app.Fragment)8 ProgressDialogFragment (com.wada811.android.dialogfragments.material.ProgressDialogFragment)6 ProgressDialogFragment (com.wada811.android.dialogfragments.traditional.ProgressDialogFragment)6 ListFragment (android.support.v4.app.ListFragment)4 AsyncSleepLoader (com.wada811.android.dialogfragments.sample.progressdialogfragment.examples.AsyncSleepLoader)4