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;
}
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;
}
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);
}
}
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");
}
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);
}
Aggregations