use of com.wada811.android.dialogfragments.traditional.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();
}
}
use of com.wada811.android.dialogfragments.traditional.ProgressDialogFragment in project Android-DialogFragments by wada811.
the class LoaderSpinnerProgressDialogFragmentExamplesActivity method onLoaderReset.
@Override
public void onLoaderReset(Loader<Object> loader) {
Log.i(TAG, "onLoaderReset");
getSupportLoaderManager().destroyLoader(loader.getId());
Fragment fragment = getSupportFragmentManager().findFragmentByTag(ProgressDialogFragment.TAG);
if (fragment != null) {
ProgressDialogFragment dialogFragment = (ProgressDialogFragment) fragment;
dialogFragment.dismissAllowingStateLoss();
}
}
use of com.wada811.android.dialogfragments.traditional.ProgressDialogFragment in project Android-DialogFragments by wada811.
the class LoaderSpinnerProgressDialogFragmentExamplesFragment method onCreateLoader.
@Override
public Loader<Object> onCreateLoader(int i, Bundle bundle) {
Log.i(TAG, "onCreateLoader");
ProgressDialogFragment dialogFragment = new ProgressDialogFragment();
dialogFragment.setIcon(R.drawable.ic_launcher);
dialogFragment.setTitle(R.string.title_activity_progress_dialog_fragment_with_loader_in_fragment);
dialogFragment.setProgressStyle(ProgressDialogFragment.STYLE_SPINNER);
dialogFragment.setMessage("Loading...");
dialogFragment.setOnCancelListener(this);
dialogFragment.show(getChildFragmentManager(), ProgressDialogFragment.TAG);
return new AsyncSleepLoader(getActivity());
}
use of com.wada811.android.dialogfragments.traditional.ProgressDialogFragment in project Android-DialogFragments by wada811.
the class LoaderSpinnerProgressDialogFragmentExamplesActivity method onCreateLoader.
@Override
public Loader<Object> onCreateLoader(int i, Bundle bundle) {
Log.i(TAG, "onCreateLoader");
ProgressDialogFragment dialogFragment = new ProgressDialogFragment();
dialogFragment.setIcon(R.drawable.ic_launcher);
dialogFragment.setTitle(R.string.title_activity_progress_dialog_fragment_with_loader_in_activity);
dialogFragment.setProgressStyle(ProgressDialogFragment.STYLE_SPINNER);
dialogFragment.setMessage("Loading...");
dialogFragment.setIndeterminate(true);
dialogFragment.setOnCancelListener(this);
dialogFragment.show(getSupportFragmentManager(), ProgressDialogFragment.TAG);
return new AsyncSleepLoader(this);
}
use of com.wada811.android.dialogfragments.traditional.ProgressDialogFragment in project Android-DialogFragments by wada811.
the class LoaderSpinnerProgressDialogFragmentExamplesActivity method onLoaderReset.
@Override
public void onLoaderReset(Loader<Object> loader) {
Log.i(TAG, "onLoaderReset");
getSupportLoaderManager().destroyLoader(loader.getId());
Fragment fragment = getSupportFragmentManager().findFragmentByTag(ProgressDialogFragment.TAG);
if (fragment != null) {
ProgressDialogFragment dialogFragment = (ProgressDialogFragment) fragment;
dialogFragment.dismissAllowingStateLoss();
}
}
Aggregations