How to set value in CENTER header in AlertDialog?

Possible duplicate:
Android user dialog: how can I center its name?

I have a code:

     return new AlertDialog.Builder(getActivity())

            .setTitle("Warning!")
            .setMessage("message!")
            .setPositiveButton("yes ",
                new DialogInterface.OnClickListener() {
                    public void onClick(DialogInterface dialog, int whichButton) {

etc ... how is .setTitle ("Warning!") set to CENTER?

+5
source share
1 answer

You cannot center the title in the default warning dialog.

You will need to create a custom dialog to center the title.

The answers here describe how to do this.

+3
source

All Articles