Search in sources :

Example 66 with DialogFragment

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);
}
Also used : DialogFragment(android.app.DialogFragment) SupportDisclaimerDialogFragment(com.android.settings.support.SupportDisclaimerDialogFragment) SupportPhoneDialogFragment(com.android.settings.support.SupportPhoneDialogFragment)

Example 67 with DialogFragment

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);
    }
}
Also used : InstrumentedDialogFragment(com.android.settings.core.instrumentation.InstrumentedDialogFragment) DialogFragment(android.app.DialogFragment) Activity(android.app.Activity)

Example 68 with DialogFragment

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);
    }
}
Also used : InstrumentedDialogFragment(com.android.settings.core.instrumentation.InstrumentedDialogFragment) DialogFragment(android.app.DialogFragment) Activity(android.app.Activity)

Example 69 with DialogFragment

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);
}
Also used : InstrumentedDialogFragment(com.android.settings.core.instrumentation.InstrumentedDialogFragment) DialogFragment(android.app.DialogFragment)

Example 70 with DialogFragment

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);
    }
}
Also used : CustomSeekBarPreference(com.frostwire.android.gui.views.preference.CustomSeekBarPreference) DialogFragment(android.app.DialogFragment)

Aggregations

DialogFragment (android.app.DialogFragment)110 InstrumentedDialogFragment (com.android.settings.core.instrumentation.InstrumentedDialogFragment)26 Fragment (android.app.Fragment)13 Activity (android.app.Activity)12 FragmentManager (android.app.FragmentManager)8 SelectPhoneAccountDialogFragment (com.android.contacts.common.widget.SelectPhoneAccountDialogFragment)8 FragmentTransaction (android.app.FragmentTransaction)7 PhoneAccountHandle (android.telecom.PhoneAccountHandle)7 SupportDisclaimerDialogFragment (com.android.settings.support.SupportDisclaimerDialogFragment)7 SupportPhoneDialogFragment (com.android.settings.support.SupportPhoneDialogFragment)7 SelectPhoneAccountListener (com.android.contacts.common.widget.SelectPhoneAccountDialogFragment.SelectPhoneAccountListener)6 Context (android.content.Context)5 Bundle (android.os.Bundle)5 CustomDialogPreference (com.android.settingslib.CustomDialogPreference)5 CustomEditTextPreference (com.android.settingslib.CustomEditTextPreference)5 Intent (android.content.Intent)4 KeyguardManager (android.app.KeyguardManager)3 ProgressDialog (android.app.ProgressDialog)3 Uri (android.net.Uri)3 TelephonyManager (android.telephony.TelephonyManager)3