asroboy
asroboy

Reputation: 23

Background alert dialog not dark when showing

I have been googling to search some article or something to help resolve my problem, may one of you can give me some solution. I just want to make color around alert dialog not dark when showing and change to light blue.

AlertDialog.Builder alertbox = new AlertDialog.Builder(c);
                alertbox.setMessage(res.getString(R.string.proceed));
                alertbox.setPositiveButton(res.getString(R.string.yes),
                        new DialogInterface.OnClickListener() {
                            public void onClick(DialogInterface arg0,
                                    int arg1) {
                                finish();

                            }

                        });

                alertbox.show();

Thanks before,

Upvotes: 0

Views: 803

Answers (1)

Nathan
Nathan

Reputation: 1767

Try this:

AlertDialog.Builder alertbox = new AlertDialog.Builder(
      new ContextThemeWrapper(c, android.R.style.Theme_Dialog));

I don't know the actual theme you want to use instead of Theme_Dialog, just try them until you find one to your liking. Or create your own theme.

Upvotes: 1

Related Questions