Violin Nz Violin Nz - 10 months ago 83
Android Question

How to center text in Alert Dialog Builder?

I'm trying to center some text in a default Alert Dialog Builder
Here's my code so far, but it defaults to the left.

new AlertDialog.Builder(getActivity())
.setTitle("Well done!")
.setMessage("Message centered????")

new DialogInterface.OnClickListener() {

public void onClick(DialogInterface dialog,
int which) {
// TODO Auto-generated method stub





Instead of setting the message, use AlertDialog.Builder.setView(View) with a View with centred text