I create a AlertDialog with the code below.
For some reason I\'m getting an extra background (see pic) on Honeycomb and above.
The code crashes
For those looking for a way to customize the dialog theme without having to stick with the default ones (as in the accepted solution), starting with Lollipop it seems that the extra background has been finally removed. So, now you can create a theme inheriting from the default one (example with AppCompat):
And instantiate your builder with this code:
AlertDialog.Builder builder = new AlertDialog.Builder(
getActivity(),
Build.VERSION.SDK_INT > Build.VERSION_CODES.KITKAT ?
R.style.SelectionDialog :
R.style.SelectionDialog_PreL);
Of course this could also be done with resource folders (values/ and values-v21/).