use of androidx.fragment.app.DialogFragment in project Signal-Android by signalapp.
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;
}
use of androidx.fragment.app.DialogFragment in project Gadgetbridge by Freeyourgadget.
the class DeviceSpecificSettingsFragment method onDisplayPreferenceDialog.
@Override
public void onDisplayPreferenceDialog(Preference preference) {
DialogFragment dialogFragment;
if (preference instanceof XTimePreference) {
dialogFragment = new XTimePreferenceFragment();
Bundle bundle = new Bundle(1);
bundle.putString("key", preference.getKey());
dialogFragment.setArguments(bundle);
dialogFragment.setTargetFragment(this, 0);
if (getFragmentManager() != null) {
dialogFragment.show(getFragmentManager(), "androidx.preference.PreferenceFragment.DIALOG");
}
} else if (preference instanceof DragSortListPreference) {
dialogFragment = new DragSortListPreferenceFragment();
Bundle bundle = new Bundle(1);
bundle.putString("key", preference.getKey());
dialogFragment.setArguments(bundle);
dialogFragment.setTargetFragment(this, 0);
if (getFragmentManager() != null) {
dialogFragment.show(getFragmentManager(), "androidx.preference.PreferenceFragment.DIALOG");
}
} else {
super.onDisplayPreferenceDialog(preference);
}
}
use of androidx.fragment.app.DialogFragment in project Signal-Android by WhisperSystems.
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 WhisperSystems.
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 Signal-Android by WhisperSystems.
the class ReactWithAnyEmojiBottomSheetDialogFragment method createForEditReactions.
public static DialogFragment createForEditReactions() {
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.putBoolean(ARG_SHADOWS, false);
args.putString(ARG_RECENT_KEY, REACTION_STORAGE_KEY);
fragment.setArguments(args);
return fragment;
}
Aggregations