This question has been asked before: AlertDialog custom title has black border
But was not answered satisfactorily - and is missing some information.
I
In my case, that border was caused by the theme of the parent Activity for the AlertDialog. To get rid of the border completely, give it a different theme (in this case, Holo):
AlertDialog.Builder builder = new AlertDialog.Builder(
new ContextThemeWrapper(this, android.R.style.Theme_Holo)
);
This fixed it for me. Hope this helps!