use of com.wada811.android.dialogfragments.material.ProgressDialogFragment in project Android-DialogFragments by wada811.
the class LoaderSpinnerProgressDialogFragmentExamplesFragment method onLoaderReset.
@Override
public void onLoaderReset(Loader<Object> objectLoader) {
Log.i(TAG, "onLoaderReset");
getLoaderManager().destroyLoader(objectLoader.getId());
Fragment fragment = getChildFragmentManager().findFragmentByTag(ProgressDialogFragment.TAG);
if (fragment != null) {
ProgressDialogFragment dialogFragment = (ProgressDialogFragment) fragment;
dialogFragment.dismissAllowingStateLoss();
}
}
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();
}
}
use of com.wada811.android.dialogfragments.material.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.material.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.material.ProgressDialogFragment in project Android-DialogFragments by wada811.
the class LoaderSpinnerProgressDialogFragmentExamplesFragment method onLoaderReset.
@Override
public void onLoaderReset(Loader<Object> objectLoader) {
Log.i(TAG, "onLoaderReset");
getLoaderManager().destroyLoader(objectLoader.getId());
Fragment fragment = getChildFragmentManager().findFragmentByTag(ProgressDialogFragment.TAG);
if (fragment != null) {
ProgressDialogFragment dialogFragment = (ProgressDialogFragment) fragment;
dialogFragment.dismissAllowingStateLoss();
}
}
Aggregations