Search in sources :

Example 6 with DialogFragment

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());
}
Also used : Bundle(android.os.Bundle) DialogFragment(androidx.fragment.app.DialogFragment)

Example 7 with DialogFragment

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());
}
Also used : Bundle(android.os.Bundle) DialogFragment(androidx.fragment.app.DialogFragment)

Example 8 with DialogFragment

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);
    }
}
Also used : DialogFragment(androidx.fragment.app.DialogFragment) ColorPickerPreference(org.thoughtcrime.securesms.preferences.widgets.ColorPickerPreference) CustomDefaultPreference(org.thoughtcrime.securesms.components.CustomDefaultPreference)

Example 9 with DialogFragment

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;
}
Also used : Bundle(android.os.Bundle) BottomSheetDialogFragment(com.google.android.material.bottomsheet.BottomSheetDialogFragment) DialogFragment(androidx.fragment.app.DialogFragment)

Example 10 with DialogFragment

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;
}
Also used : Bundle(android.os.Bundle) BottomSheetDialogFragment(com.google.android.material.bottomsheet.BottomSheetDialogFragment) DialogFragment(androidx.fragment.app.DialogFragment)

Aggregations

DialogFragment (androidx.fragment.app.DialogFragment)55 Bundle (android.os.Bundle)22 BottomSheetDialogFragment (com.google.android.material.bottomsheet.BottomSheetDialogFragment)8 Intent (android.content.Intent)7 Fragment (androidx.fragment.app.Fragment)4 InstrumentedDialogFragment (com.android.settings.core.instrumentation.InstrumentedDialogFragment)4 Test (org.junit.Test)4 FullScreenDialogFragment (org.thoughtcrime.securesms.components.FullScreenDialogFragment)4 NonNull (androidx.annotation.NonNull)3 FragmentTransaction (androidx.fragment.app.FragmentTransaction)3 ConfirmationDialogFragment (com.fsck.k9.fragment.ConfirmationDialogFragment)3 FileDataStorageManager (com.owncloud.android.datamodel.FileDataStorageManager)3 OCFile (com.owncloud.android.datamodel.OCFile)3 OCUpload (com.owncloud.android.db.OCUpload)3 ScreenshotTest (com.owncloud.android.utils.ScreenshotTest)3 FragmentManager (androidx.fragment.app.FragmentManager)2 AttachmentDownloadDialogFragment (com.fsck.k9.fragment.AttachmentDownloadDialogFragment)2 ArrayList (java.util.ArrayList)2 CustomDefaultPreference (org.thoughtcrime.securesms.components.CustomDefaultPreference)2 ColorPickerPreference (org.thoughtcrime.securesms.preferences.widgets.ColorPickerPreference)2