Example usage for android.app Activity showDialog

List of usage examples for android.app Activity showDialog

Introduction

In this page you can find the example usage for android.app Activity showDialog.

Prototype

@Deprecated
public final void showDialog(int id) 

Source Link

Document

Simple version of #showDialog(int,Bundle) that does not take any arguments.

Usage

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);
    }
    //    }
}