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);
}
}
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");
}
}
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);
}
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);
}
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");
}
Aggregations