Search in sources :

Example 26 with DialogFragment

use of androidx.fragment.app.DialogFragment in project EhViewer by seven332.

the class HostsActivity method onItemClick.

@Override
public boolean onItemClick(EasyRecyclerView easyRecyclerView, View view, int position, long id) {
    Pair<String, String> pair = data.get(position);
    Bundle args = new Bundle();
    args.putString(KEY_HOST, pair.first);
    args.putString(KEY_IP, pair.second);
    DialogFragment fragment = new EditHostDialogFragment();
    fragment.setArguments(args);
    fragment.show(getSupportFragmentManager(), DIALOG_TAG_EDIT_HOST);
    return true;
}
Also used : Bundle(android.os.Bundle) DialogFragment(androidx.fragment.app.DialogFragment)

Example 27 with DialogFragment

use of androidx.fragment.app.DialogFragment in project Slide by ccrama.

the class FolderChooserDialogCreate method show.

public void show(final FragmentManager fragmentManager) {
    final String tag = getBuilder().tag;
    final Fragment frag = fragmentManager.findFragmentByTag(tag);
    if (frag != null) {
        ((DialogFragment) frag).dismiss();
        fragmentManager.beginTransaction().remove(frag).commit();
    }
    show(fragmentManager, tag);
}
Also used : DialogFragment(androidx.fragment.app.DialogFragment) Fragment(androidx.fragment.app.Fragment) DialogFragment(androidx.fragment.app.DialogFragment)

Example 28 with DialogFragment

use of androidx.fragment.app.DialogFragment in project Signal-Android by signalapp.

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 29 with DialogFragment

use of androidx.fragment.app.DialogFragment in project Signal-Android by signalapp.

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)

Example 30 with DialogFragment

use of androidx.fragment.app.DialogFragment in project Signal-Android by signalapp.

the class LongMessageFragment method create.

public static DialogFragment create(long messageId, boolean isMms) {
    DialogFragment fragment = new LongMessageFragment();
    Bundle args = new Bundle();
    args.putLong(KEY_MESSAGE_ID, messageId);
    args.putBoolean(KEY_IS_MMS, isMms);
    fragment.setArguments(args);
    return fragment;
}
Also used : Bundle(android.os.Bundle) FullScreenDialogFragment(org.thoughtcrime.securesms.components.FullScreenDialogFragment) 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