Search in sources :

Example 16 with DialogFragment

use of androidx.fragment.app.DialogFragment in project Resurrection_packages_apps_Settings by ResurrectionRemix.

the class AppInfoBase method showDialogInner.

protected void showDialogInner(int id, int moveErrorCode) {
    DialogFragment newFragment = MyAlertDialogFragment.newInstance(id, moveErrorCode);
    newFragment.setTargetFragment(this, 0);
    newFragment.show(getFragmentManager(), "dialog " + id);
}
Also used : InstrumentedDialogFragment(com.android.settings.core.instrumentation.InstrumentedDialogFragment) DialogFragment(androidx.fragment.app.DialogFragment)

Example 17 with DialogFragment

use of androidx.fragment.app.DialogFragment in project Resurrection_packages_apps_Settings by ResurrectionRemix.

the class SettingsPreferenceFragment method onDisplayPreferenceDialog.

@Override
public void onDisplayPreferenceDialog(Preference preference) {
    if (preference.getKey() == null) {
        // Auto-key preferences that don't have a key, so the dialog can find them.
        preference.setKey(UUID.randomUUID().toString());
    }
    DialogFragment f = null;
    if (preference instanceof RestrictedListPreference) {
        f = RestrictedListPreference.RestrictedListPreferenceDialogFragment.newInstance(preference.getKey());
    } else if (preference instanceof CustomListPreference) {
        f = CustomListPreference.CustomListPreferenceDialogFragment.newInstance(preference.getKey());
    } else if (preference instanceof CustomDialogPreferenceCompat) {
        f = CustomDialogPreferenceCompat.CustomPreferenceDialogFragment.newInstance(preference.getKey());
    } else if (preference instanceof CustomEditTextPreferenceCompat) {
        f = CustomEditTextPreferenceCompat.CustomPreferenceDialogFragment.newInstance(preference.getKey());
    } else {
        super.onDisplayPreferenceDialog(preference);
        return;
    }
    f.setTargetFragment(this, 0);
    f.show(getFragmentManager(), "dialog_preference");
    onDialogShowing();
}
Also used : CustomEditTextPreferenceCompat(com.android.settingslib.CustomEditTextPreferenceCompat) InstrumentedDialogFragment(com.android.settings.core.instrumentation.InstrumentedDialogFragment) DialogFragment(androidx.fragment.app.DialogFragment) CustomDialogPreferenceCompat(com.android.settingslib.CustomDialogPreferenceCompat)

Example 18 with DialogFragment

use of androidx.fragment.app.DialogFragment in project zype-android by zype.

the class LoginActivity method showDialog.

void showDialog() {
    DialogFragment newFragment = CustomAlertDialog.newInstance(R.string.alert_dialog_title_auth_failed, R.string.alert_dialog_message_auth_failed);
    // newFragment.show(getSupportFragmentManager(), "dialog");
    FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();
    transaction.add(newFragment, "Error credentials dialog");
    transaction.commitAllowingStateLoss();
}
Also used : FragmentTransaction(androidx.fragment.app.FragmentTransaction) DialogFragment(androidx.fragment.app.DialogFragment)

Example 19 with DialogFragment

use of androidx.fragment.app.DialogFragment in project mopub-android-mediation by mopub.

the class MoPubListFragment method onTrashCanClicked.

@Override
public void onTrashCanClicked(final MoPubSampleAdUnit adUnit) {
    final DialogFragment deleteConfirmation = DeleteDialogFragment.newInstance(adUnit);
    deleteConfirmation.setTargetFragment(this, 0);
    deleteConfirmation.show(getActivity().getSupportFragmentManager(), "delete");
}
Also used : DialogFragment(androidx.fragment.app.DialogFragment)

Example 20 with DialogFragment

use of androidx.fragment.app.DialogFragment in project bitcoin-wallet by bitcoin-wallet.

the class BackupWalletDialogFragment method show.

public static void show(final FragmentManager fm) {
    final DialogFragment newFragment = new BackupWalletDialogFragment();
    newFragment.show(fm, FRAGMENT_TAG);
}
Also used : 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