Code example for ContextThemeWrapper

0
    } 
 
    public static void showRateDialog(final Context mContext, final SharedPreferences.Editor editor) {
 
        AlertDialog.Builder builder = new AlertDialog.Builder(new ContextThemeWrapper(mContext,
                android.R.style.Theme_Holo_Light_Dialog));
        builder.setTitle("Rate " + APP_TITLE)
        .setMessage("If you enjoy using " + APP_TITLE + ", please take a moment to rate it. Thanks for your support!")
        .setPositiveButton("Rate " + APP_TITLE, new DialogInterface.OnClickListener() {
 
            @Override 
            public void onClick(DialogInterface dialog, int which) {
                mContext.startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id=" + APP_PNAME)));
 
            } 
        }) 
        .setNeutralButton("Remind me later", new DialogInterface.OnClickListener() {
 
            @Override 
            public void onClick(DialogInterface dialog, int which) {
                dialog.dismiss();