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();
}
}
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);
}
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());
}
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());
}
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());
}
Aggregations