use of android.app.DialogFragment in project android_packages_apps_Settings by LineageOS.
the class SupportItemAdapter method tryStartDisclaimerAndSupport.
/**
* Show a disclaimer dialog and start support action after disclaimer has been acknowledged.
*/
private void tryStartDisclaimerAndSupport(@SupportFeatureProvider.SupportType final int type) {
if (mSupportFeatureProvider.shouldShowDisclaimerDialog(mActivity)) {
DialogFragment fragment = SupportDisclaimerDialogFragment.newInstance(mAccounts[mSelectedAccountIndex], type);
fragment.show(mActivity.getFragmentManager(), SupportDisclaimerDialogFragment.TAG);
return;
}
mSupportFeatureProvider.startSupport(mActivity, mAccounts[mSelectedAccountIndex], type);
}
use of android.app.DialogFragment in project android_packages_apps_Settings by LineageOS.
the class DefaultAppPickerFragment method onRadioButtonClicked.
@Override
public void onRadioButtonClicked(RadioButtonPreference selected) {
final String selectedKey = selected.getKey();
final CharSequence confirmationMessage = getConfirmationMessage(getCandidate(selectedKey));
final Activity activity = getActivity();
if (TextUtils.isEmpty(confirmationMessage)) {
super.onRadioButtonClicked(selected);
} else if (activity != null) {
final DialogFragment fragment = newConfirmationDialogFragment(selectedKey, confirmationMessage);
fragment.show(activity.getFragmentManager(), ConfirmationDialogFragment.TAG);
}
}
use of android.app.DialogFragment in project android_packages_apps_Settings by LineageOS.
the class ShortcutServicePickerFragment method onRadioButtonClicked.
@Override
public void onRadioButtonClicked(RadioButtonPreference selected) {
final String selectedKey = selected.getKey();
final Activity activity = getActivity();
if (TextUtils.isEmpty(selectedKey)) {
super.onRadioButtonClicked(selected);
} else if (activity != null) {
final DialogFragment fragment = ConfirmationDialogFragment.newInstance(this, selectedKey);
fragment.show(activity.getFragmentManager(), ConfirmationDialogFragment.TAG);
}
}
use of android.app.DialogFragment in project android_packages_apps_Settings by LineageOS.
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);
}
use of android.app.DialogFragment in project frostwire by frostwire.
the class TorrentPreferenceFragment method onDisplayPreferenceDialog.
@Override
public void onDisplayPreferenceDialog(Preference preference) {
if (preference instanceof CustomSeekBarPreference) {
DialogFragment fragment;
fragment = CustomSeekBarPreferenceDialog.newInstance((CustomSeekBarPreference) preference);
fragment.setTargetFragment(this, 0);
fragment.show(getFragmentManager(), DIALOG_FRAGMENT_TAG);
} else {
super.onDisplayPreferenceDialog(preference);
}
}
Aggregations