Search in sources :

Example 41 with DialogFragment

use of android.support.v4.app.DialogFragment in project YourAppIdea by Michenux.

the class ChangeLogHelper method showChangeLogFromVersion.

public void showChangeLogFromVersion(int resTitle, int resCloseLabel, int resChangeLog, int fromVersion, FragmentActivity fragmentActivity) {
    String changeLog = getHTMLChangelog(resChangeLog, fragmentActivity.getResources(), fromVersion, fragmentActivity);
    if (!TextUtils.isEmpty(changeLog)) {
        FragmentManager fm = fragmentActivity.getSupportFragmentManager();
        ChangeLogDialogFragment dialogFragment = ChangeLogDialogFragment.newInstance(resTitle, resCloseLabel, changeLog);
        dialogFragment.show(fm, null);
    }
}
Also used : FragmentManager(android.support.v4.app.FragmentManager)

Example 42 with DialogFragment

use of android.support.v4.app.DialogFragment 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.material.ProgressDialogFragment) ProgressDialogFragment(com.wada811.android.dialogfragments.material.ProgressDialogFragment) Fragment(android.support.v4.app.Fragment)

Example 43 with DialogFragment

use of android.support.v4.app.DialogFragment 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();
    }
}
Also used : ProgressDialogFragment(com.wada811.android.dialogfragments.material.ProgressDialogFragment) ProgressDialogFragment(com.wada811.android.dialogfragments.material.ProgressDialogFragment) Fragment(android.support.v4.app.Fragment)

Example 44 with DialogFragment

use of android.support.v4.app.DialogFragment 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();
    }
}
Also used : ProgressDialogFragment(com.wada811.android.dialogfragments.traditional.ProgressDialogFragment) Fragment(android.support.v4.app.Fragment) ProgressDialogFragment(com.wada811.android.dialogfragments.traditional.ProgressDialogFragment)

Example 45 with DialogFragment

use of android.support.v4.app.DialogFragment 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();
    }
}
Also used : ProgressDialogFragment(com.wada811.android.dialogfragments.traditional.ProgressDialogFragment) Fragment(android.support.v4.app.Fragment) ListFragment(android.support.v4.app.ListFragment) ProgressDialogFragment(com.wada811.android.dialogfragments.traditional.ProgressDialogFragment)

Aggregations

DialogFragment (android.support.v4.app.DialogFragment)85 Fragment (android.support.v4.app.Fragment)31 FragmentTransaction (android.support.v4.app.FragmentTransaction)24 Bundle (android.os.Bundle)10 FragmentManager (android.support.v4.app.FragmentManager)9 View (android.view.View)8 SherlockDialogFragment (com.actionbarsherlock.app.SherlockDialogFragment)8 TextView (android.widget.TextView)7 AlertDialog (android.app.AlertDialog)5 DialogInterface (android.content.DialogInterface)4 OnClickListener (android.content.DialogInterface.OnClickListener)4 Intent (android.content.Intent)4 ListFragment (android.support.v4.app.ListFragment)4 AppCompatDialogFragment (android.support.v7.app.AppCompatDialogFragment)4 OnClickListener (android.view.View.OnClickListener)4 Button (android.widget.Button)4 ItemPinnedMessageDialogFragment (com.h6ah4i.android.example.advrecyclerview.common.fragment.ItemPinnedMessageDialogFragment)4 ProgressDialogFragment (com.wada811.android.dialogfragments.material.ProgressDialogFragment)4 Dialog (android.app.Dialog)3 ProgressDialogFragment (com.wada811.android.dialogfragments.traditional.ProgressDialogFragment)3