Search in sources :

Example 11 with DialogFragment

use of android.support.v4.app.DialogFragment in project material-dialogs by afollestad.

the class ColorChooserDialog method dismissIfNecessary.

private void dismissIfNecessary(AppCompatActivity context, String tag) {
    Fragment frag = context.getSupportFragmentManager().findFragmentByTag(tag);
    if (frag != null) {
        ((DialogFragment) frag).dismiss();
        context.getSupportFragmentManager().beginTransaction().remove(frag).commit();
    }
}
Also used : DialogFragment(android.support.v4.app.DialogFragment) DialogFragment(android.support.v4.app.DialogFragment) Fragment(android.support.v4.app.Fragment)

Example 12 with DialogFragment

use of android.support.v4.app.DialogFragment in project material-dialogs by afollestad.

the class FileChooserDialog method show.

public void show(FragmentActivity context) {
    final String tag = getBuilder().tag;
    Fragment frag = context.getSupportFragmentManager().findFragmentByTag(tag);
    if (frag != null) {
        ((DialogFragment) frag).dismiss();
        context.getSupportFragmentManager().beginTransaction().remove(frag).commit();
    }
    show(context.getSupportFragmentManager(), tag);
}
Also used : DialogFragment(android.support.v4.app.DialogFragment) DialogFragment(android.support.v4.app.DialogFragment) Fragment(android.support.v4.app.Fragment)

Example 13 with DialogFragment

use of android.support.v4.app.DialogFragment in project materialistic by hidroh.

the class ItemFragment method showPreferences.

private void showPreferences() {
    Bundle args = new Bundle();
    args.putInt(PopupSettingsFragment.EXTRA_TITLE, R.string.font_options);
    args.putInt(PopupSettingsFragment.EXTRA_SUMMARY, R.string.pull_up_hint);
    args.putIntArray(PopupSettingsFragment.EXTRA_XML_PREFERENCES, new int[] { R.xml.preferences_font, R.xml.preferences_comments });
    ((DialogFragment) Fragment.instantiate(getActivity(), PopupSettingsFragment.class.getName(), args)).show(getFragmentManager(), PopupSettingsFragment.class.getName());
}
Also used : Bundle(android.os.Bundle) DialogFragment(android.support.v4.app.DialogFragment)

Example 14 with DialogFragment

use of android.support.v4.app.DialogFragment in project materialistic by hidroh.

the class BaseListFragment method showPreferences.

private void showPreferences() {
    Bundle args = new Bundle();
    args.putInt(PopupSettingsFragment.EXTRA_TITLE, R.string.list_display_options);
    args.putInt(PopupSettingsFragment.EXTRA_SUMMARY, R.string.pull_up_hint);
    args.putIntArray(PopupSettingsFragment.EXTRA_XML_PREFERENCES, new int[] { R.xml.preferences_font, R.xml.preferences_list });
    ((DialogFragment) Fragment.instantiate(getActivity(), PopupSettingsFragment.class.getName(), args)).show(getFragmentManager(), PopupSettingsFragment.class.getName());
}
Also used : Bundle(android.os.Bundle) DialogFragment(android.support.v4.app.DialogFragment)

Example 15 with DialogFragment

use of android.support.v4.app.DialogFragment in project materialistic by hidroh.

the class WebFragment method showPreferences.

private void showPreferences() {
    Bundle args = new Bundle();
    args.putInt(PopupSettingsFragment.EXTRA_TITLE, R.string.font_options);
    args.putIntArray(PopupSettingsFragment.EXTRA_XML_PREFERENCES, new int[] { R.xml.preferences_readability });
    ((DialogFragment) Fragment.instantiate(getActivity(), PopupSettingsFragment.class.getName(), args)).show(getFragmentManager(), PopupSettingsFragment.class.getName());
}
Also used : Bundle(android.os.Bundle) DialogFragment(android.support.v4.app.DialogFragment)

Aggregations

DialogFragment (android.support.v4.app.DialogFragment)73 Fragment (android.support.v4.app.Fragment)29 FragmentTransaction (android.support.v4.app.FragmentTransaction)21 FragmentManager (android.support.v4.app.FragmentManager)9 Bundle (android.os.Bundle)8 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