use of androidx.fragment.app.DialogFragment in project Signal-Android by WhisperSystems.
the class GroupLinkShareQrDialogFragment method show.
public static void show(@NonNull FragmentManager manager, @NonNull GroupId.V2 groupId) {
DialogFragment fragment = new GroupLinkShareQrDialogFragment();
Bundle args = new Bundle();
args.putString(ARG_GROUP_ID, groupId.toString());
fragment.setArguments(args);
fragment.show(manager, BottomSheetUtil.STANDARD_BOTTOM_SHEET_FRAGMENT_TAG);
}
use of androidx.fragment.app.DialogFragment in project Signal-Android by WhisperSystems.
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;
}
use of androidx.fragment.app.DialogFragment in project android-styled-dialogs by avast.
the class BaseDialogFragment method getDialogListeners.
/**
* Utility method for acquiring all listeners of some type for current instance of DialogFragment
*
* @param listenerInterface Interface of the desired listeners
* @return Unmodifiable list of listeners
* @since 2.1.0
*/
@SuppressWarnings("unchecked")
protected <T> List<T> getDialogListeners(Class<T> listenerInterface) {
final Fragment targetFragment = getTargetFragment();
List<T> listeners = new ArrayList<T>(2);
if (targetFragment != null && listenerInterface.isAssignableFrom(targetFragment.getClass())) {
listeners.add((T) targetFragment);
}
if (getActivity() != null && listenerInterface.isAssignableFrom(getActivity().getClass())) {
listeners.add((T) getActivity());
}
return Collections.unmodifiableList(listeners);
}
use of androidx.fragment.app.DialogFragment in project Resurrection_packages_apps_Settings by ResurrectionRemix.
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 Resurrection_packages_apps_Settings by ResurrectionRemix.
the class InstantAppButtonsPreferenceController method showDialog.
private void showDialog() {
final DialogFragment newFragment = InstantAppButtonDialogFragment.newInstance(mPackageName);
newFragment.setTargetFragment(mParent, 0);
newFragment.show(mParent.getFragmentManager(), KEY_INSTANT_APP_BUTTONS);
}
Aggregations