AlertDialog: How To Remove Black Borders Above and Below View

后端 未结 5 1725
难免孤独
难免孤独 2020-12-05 06:47

This question has been asked before: AlertDialog custom title has black border

But was not answered satisfactorily - and is missing some information.


I

5条回答
  •  庸人自扰
    2020-12-05 07:25

    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!

提交回复
热议问题