The first image is from a Galaxy Note, the second is from a Droid 3. Both of them produced from the below code.
The dialog on the Droid 3 has a significant amount of extra, ugly space. This space is even uglier on more complex dialogs. Is there any way to prevent it?
public void onCreate(Bundle bundle)
{
super.onCreate(bundle);
TextView tv = new TextView(this);
tv.setText("Hello!");
Dialog dialog = new Dialog(this);
dialog.setContentView(tv);
dialog.setTitle("Hi!");
dialog.show();
}


These Droid UI customizations drive me crazy!
If you’d like to control your dialogs to make them consistent across devices, you can strip them down to the basics with a constructor that supplies a style parameter. The following example gives a dialog that looks like this:
First, instantiate your dialog like this (or better yet, create a custom class that extends Dialog so you can reuse it):
Then, supply a custom_dialog_layout.xml (could look something like this):
where dialog_background.xml looks something like this:
And if you really want to get fancy, you could try applying a drop shadow to the dialog_layout in code using something like this SO answer: https://stackoverflow.com/a/3723654/475217