List of usage examples for android.app Activity showDialog
@Deprecated public final void showDialog(int id)
From source file:Main.java
static void showError(final Activity activity) { activity.showDialog(0); }
From source file:org.totschnig.myexpenses.util.Utils.java
public static void viewContribApp(Activity ctx) { Intent i = new Intent(Intent.ACTION_VIEW); i.setData(Uri.parse("market://details?id=org.totschnig.myexpenses.contrib")); if (Utils.isIntentAvailable(ctx, i)) { ctx.startActivity(i);/*from w w w . j a v a2 s . com*/ } else { if (ctx instanceof FragmentActivity) DonateDialogFragment.newInstance().show(((FragmentActivity) ctx).getSupportFragmentManager(), "CONTRIB"); else { //We are called from MyPreferenceActivity where support fragmentmanager is not available ctx.showDialog(R.id.DONATE_DIALOG); } } }
From source file:org.totschnig.myexpenses.util.Utils.java
public static void contribBuyDo(Activity ctx) { // Intent i = new Intent(Intent.ACTION_VIEW); // i.setData(Uri.parse(MyApplication.MARKET_PREFIX + "org.totschnig.myexpenses.contrib")); // if (Utils.isIntentAvailable(ctx,i)) { // ctx.startActivity(i); // } else { if (ctx instanceof FragmentActivity) DonateDialogFragment.newInstance().show(((FragmentActivity) ctx).getSupportFragmentManager(), "CONTRIB"); else {//w w w . j a v a2 s .c om //We are called from MyPreferenceActivity where support fragmentmanager is not available ctx.showDialog(R.id.DONATE_DIALOG); } // } }