How to remove the border and black spaces from a custom dialog?

view story

http://stackoverflow.com – I want to create and show a custom dialog: AlertDialog dialog=new AlertDialog.Builder(this,R.style.BubbleDialog).create(); dialog.setView(detailsView,0,0,0,0); dialog.show(); And that's the style: <style name="BubbleDialog" parent="@android:style/Theme.Dialog"> <item name="android:windowBackground">@android:color/transparent</item> </style> However, I'm getting: If you look closely, you can see there's a dark grey border around the view, and also, because the corners are rounded, there are small black spaces where a rectangular corner would be. How can I (HowTos)