Search in sources :

Example 61 with DialogFragment

use of android.app.DialogFragment in project WordPress-Android by wordpress-mobile.

the class SitePickerActivity method addSite.

public static void addSite(Activity activity, boolean isSignedInWpCom) {
    // create a new wp.com blog or add a self-hosted one
    if (isSignedInWpCom) {
        DialogFragment dialog = new AddSiteDialog();
        dialog.show(activity.getFragmentManager(), AddSiteDialog.ADD_SITE_DIALOG_TAG);
    } else {
        // user isn't signed into wp.com, so simply enable adding self-hosted
        ActivityLauncher.addSelfHostedSiteForResult(activity);
    }
}
Also used : DialogFragment(android.app.DialogFragment)

Example 62 with DialogFragment

use of android.app.DialogFragment in project WordPress-Android by wordpress-mobile.

the class StatsActivity method bumpPromoAnaylticsAndShowPromoDialogIfNecessary.

private void bumpPromoAnaylticsAndShowPromoDialogIfNecessary() {
    if (mIsUpdatingStats || mThereWasAnErrorLoadingStats) {
        // Do nothing in case of errors or when it's still loading
        return;
    }
    if (!StringUtils.isEmpty(AppPrefs.getStatsWidgetsKeys())) {
        // Stats widgets already used!!
        return;
    }
    // Bump analytics that drives the Promo widget when the loading is completed without errors.
    AppPrefs.bumpAnalyticsForStatsWidgetPromo();
    // Should we display the widget promo?
    int counter = AppPrefs.getAnalyticsForStatsWidgetPromo();
    if (counter == 3 || counter == 1000 || counter == 10000) {
        DialogFragment newFragment = PromoDialog.newInstance(R.drawable.stats_widget_promo_header, R.string.stats_widget_promo_title, R.string.stats_widget_promo_desc, R.string.stats_widget_promo_ok_btn_label);
        newFragment.show(getFragmentManager(), "promote_widget_dialog");
    }
}
Also used : DialogFragment(android.app.DialogFragment)

Example 63 with DialogFragment

use of android.app.DialogFragment in project Resurrection_packages_apps_Settings by ResurrectionRemix.

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(mAccount, type);
        fragment.show(mActivity.getFragmentManager(), SupportDisclaimerDialogFragment.TAG);
        return;
    }
    mSupportFeatureProvider.startSupport(mActivity, mAccount, type);
}
Also used : DialogFragment(android.app.DialogFragment) SupportDisclaimerDialogFragment(com.android.settings.support.SupportDisclaimerDialogFragment) SupportPhoneDialogFragment(com.android.settings.support.SupportPhoneDialogFragment)

Example 64 with DialogFragment

use of android.app.DialogFragment in project Resurrection_packages_apps_Settings by ResurrectionRemix.

the class PixelAnimDurationSettings method showDialogInner.

private void showDialogInner(int id) {
    DialogFragment newFragment = MyAlertDialogFragment.newInstance(id);
    newFragment.setTargetFragment(this, 0);
    newFragment.show(getFragmentManager(), "dialog " + id);
}
Also used : DialogFragment(android.app.DialogFragment)

Example 65 with DialogFragment

use of android.app.DialogFragment in project android_packages_apps_Settings by LineageOS.

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