Using drawables instead of text for AlertDialog Buttons
<p>I'm trying to set the Positive, Negative and Neutral buttons of an AlertDialog to drawables rather than text.</p>

<p>I've been successful thus far using this:</p>

<pre><code>AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setMessage("Are you sure you want to exit?")
.setPositiveButton("Save", new DialogInterface.OnClickListener() {...})
.setNeutralButton("Trash", new DialogInterface.OnClickListener() {...})
.setNegativeButton("Cancel", new DialogInterface.OnClickListener() {...});

AlertDialog alert = builder.create();
alert.show();

Button button0 = alert.getButton(AlertDialog.BUTTON_POSITIVE);
button0.setCompoundDrawablesWithIntrinsicBounds(this.getResources().getDrawable(R.drawable.ic_menu_save), null, null, null);
button0.setText("");

Button button1 = alert.getButton(AlertDialog.BUTTON_NEUTRAL);
button1.setCompoundDrawablesWithIntrinsicBounds(this.getResources().getDrawable(R.drawable.ic_menu_delete), null, null, null);
button1.setText("");

Button button2 = alert.getButton(AlertDialog.BUTTON_NEGATIVE);
button2.setCompoundDrawablesWithIntrinsicBounds(this.getResources().getDrawable(R.drawable.ic_menu_close_clear_cancel), null, null, null);
button2.setText("");
</code></pre>

<p>This is a workaround though, because I'm really just erasing the text after the fact. My problem is that you can't seem to instantiate a button without setting some kind of text. </p>

<p>Setting "[blank_space]" from the beginning yields the same result with the image being pushed to the left. Setting null or "" in the same place draws the AlertDialog without the button at all. You can see how it pushes to the left in the picture here:</p>

<p><img src="https://dl.dropbox.com/u/1288624/alertdialogbuttons.png" alt="picture"></p>

<p>Is there anyway to use pictures only? It would be much nicer than trying to handle translations for my simple situation.</p>
