Remove black background on custom dialog

前端 未结 13 2214
清歌不尽
清歌不尽 2021-01-30 20:54

I want to remove the black background on custom dialog as shown in the picture. I\'m sure the black background was from the dialog, not from app\'s background.

相关标签:
13条回答
  • 2021-01-30 21:24
    public MyAlertDialog(
            Context context, 
            int theme
        ) extends AlertDialog { 
    
        super(context, theme);
        getWindow().setBackgroundDrawable(new ColorDrawable(android.graphics.Color.TRANSPARENT));
    }
    
    0 讨论(0)
提交回复
热议问题