Search in sources :

Example 56 with DialogFragment

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

the class MessageDetailsFragment method create.

@NonNull
public static DialogFragment create(@NonNull MessageRecord message, @NonNull RecipientId recipientId) {
    DialogFragment dialogFragment = new MessageDetailsFragment();
    Bundle args = new Bundle();
    args.putLong(MESSAGE_ID_EXTRA, message.getId());
    args.putString(TYPE_EXTRA, message.isMms() ? MmsSmsDatabase.MMS_TRANSPORT : MmsSmsDatabase.SMS_TRANSPORT);
    args.putParcelable(RECIPIENT_EXTRA, recipientId);
    dialogFragment.setArguments(args);
    return dialogFragment;
}
Also used : Bundle(android.os.Bundle) FullScreenDialogFragment(org.thoughtcrime.securesms.components.FullScreenDialogFragment) DialogFragment(androidx.fragment.app.DialogFragment) NonNull(androidx.annotation.NonNull)

Example 57 with DialogFragment

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

the class ReactionsBottomSheetDialogFragment method create.

public static DialogFragment create(long messageId, boolean isMms) {
    Bundle args = new Bundle();
    DialogFragment fragment = new ReactionsBottomSheetDialogFragment();
    args.putLong(ARGS_MESSAGE_ID, messageId);
    args.putBoolean(ARGS_IS_MMS, isMms);
    fragment.setArguments(args);
    return fragment;
}
Also used : Bundle(android.os.Bundle) BottomSheetDialogFragment(com.google.android.material.bottomsheet.BottomSheetDialogFragment) DialogFragment(androidx.fragment.app.DialogFragment)

Example 58 with DialogFragment

use of androidx.fragment.app.DialogFragment in project android_packages_apps_Settings by omnirom.

the class DefaultAppPickerFragment method onRadioButtonClicked.

@Override
public void onRadioButtonClicked(RadioButtonPreference selected) {
    final String selectedKey = selected.getKey();
    final CharSequence confirmationMessage = getConfirmationMessage(getCandidate(selectedKey));
    final FragmentActivity activity = getActivity();
    if (TextUtils.isEmpty(confirmationMessage)) {
        super.onRadioButtonClicked(selected);
    } else if (activity != null) {
        final DialogFragment fragment = newConfirmationDialogFragment(selectedKey, confirmationMessage);
        fragment.show(activity.getSupportFragmentManager(), ConfirmationDialogFragment.TAG);
    }
}
Also used : FragmentActivity(androidx.fragment.app.FragmentActivity) InstrumentedDialogFragment(com.android.settings.core.instrumentation.InstrumentedDialogFragment) DialogFragment(androidx.fragment.app.DialogFragment)

Example 59 with DialogFragment

use of androidx.fragment.app.DialogFragment in project android_packages_apps_Settings by omnirom.

the class RunningServiceDetails method showConfirmStopDialog.

private void showConfirmStopDialog(ComponentName comp) {
    DialogFragment newFragment = MyAlertDialogFragment.newConfirmStop(DIALOG_CONFIRM_STOP, comp);
    newFragment.setTargetFragment(this, 0);
    newFragment.show(getFragmentManager(), "confirmstop");
}
Also used : InstrumentedDialogFragment(com.android.settings.core.instrumentation.InstrumentedDialogFragment) DialogFragment(androidx.fragment.app.DialogFragment)

Example 60 with DialogFragment

use of androidx.fragment.app.DialogFragment in project android_packages_apps_Settings by omnirom.

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)

Aggregations

DialogFragment (androidx.fragment.app.DialogFragment)62 Bundle (android.os.Bundle)22 InstrumentedDialogFragment (com.android.settings.core.instrumentation.InstrumentedDialogFragment)8 BottomSheetDialogFragment (com.google.android.material.bottomsheet.BottomSheetDialogFragment)8 Intent (android.content.Intent)7 Fragment (androidx.fragment.app.Fragment)5 FragmentTransaction (androidx.fragment.app.FragmentTransaction)4 Test (org.junit.Test)4 FullScreenDialogFragment (org.thoughtcrime.securesms.components.FullScreenDialogFragment)4 NonNull (androidx.annotation.NonNull)3 FragmentManager (androidx.fragment.app.FragmentManager)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 FragmentActivity (androidx.fragment.app.FragmentActivity)2 CustomDialogPreferenceCompat (com.android.settingslib.CustomDialogPreferenceCompat)2 CustomEditTextPreferenceCompat (com.android.settingslib.CustomEditTextPreferenceCompat)2 AttachmentDownloadDialogFragment (com.fsck.k9.fragment.AttachmentDownloadDialogFragment)2