use of androidx.fragment.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 androidx.fragment.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());
}
use of androidx.fragment.app.DialogFragment in project Signal-Android by WhisperSystems.
the class CorrectedPreferenceFragment method onDisplayPreferenceDialog.
@Override
public void onDisplayPreferenceDialog(Preference preference) {
DialogFragment dialogFragment = null;
if (preference instanceof ColorPickerPreference) {
dialogFragment = ColorPickerPreferenceDialogFragmentCompat.newInstance(preference.getKey());
} else if (preference instanceof CustomDefaultPreference) {
dialogFragment = CustomDefaultPreference.CustomDefaultPreferenceDialogFragmentCompat.newInstance(preference.getKey());
}
if (dialogFragment != null) {
dialogFragment.setTargetFragment(this, 0);
dialogFragment.show(getFragmentManager(), "android.support.v7.preference.PreferenceFragment.DIALOG");
} else {
super.onDisplayPreferenceDialog(preference);
}
}
use of androidx.fragment.app.DialogFragment in project Signal-Android by WhisperSystems.
the class ReactWithAnyEmojiBottomSheetDialogFragment method createForMessageRecord.
public static DialogFragment createForMessageRecord(@NonNull MessageRecord messageRecord, int startingPage) {
DialogFragment fragment = new ReactWithAnyEmojiBottomSheetDialogFragment();
Bundle args = new Bundle();
args.putLong(ARG_MESSAGE_ID, messageRecord.getId());
args.putBoolean(ARG_IS_MMS, messageRecord.isMms());
args.putInt(ARG_START_PAGE, startingPage);
args.putString(ARG_RECENT_KEY, REACTION_STORAGE_KEY);
args.putBoolean(ARG_EDIT, true);
fragment.setArguments(args);
return fragment;
}
use of androidx.fragment.app.DialogFragment in project Signal-Android by WhisperSystems.
the class ReactWithAnyEmojiBottomSheetDialogFragment method createForAboutSelection.
public static DialogFragment createForAboutSelection() {
DialogFragment fragment = new ReactWithAnyEmojiBottomSheetDialogFragment();
Bundle args = new Bundle();
args.putLong(ARG_MESSAGE_ID, -1);
args.putBoolean(ARG_IS_MMS, false);
args.putInt(ARG_START_PAGE, -1);
args.putString(ARG_RECENT_KEY, ABOUT_STORAGE_KEY);
fragment.setArguments(args);
return fragment;
}
Aggregations