Dialog with transparent background in Android

前端 未结 20 2441
孤城傲影
孤城傲影 2020-11-22 15:02

How do I remove the black background from a dialog box in Android. The pic shows the problem.

\"enter

相关标签:
20条回答
  • 2020-11-22 15:44

    if you want destroy dark background of dialog , use this

    dialog.getWindow().setDimAmount(0);
    
    0 讨论(0)
  • 2020-11-22 15:46

    dialog.getWindow().setBackgroundDrawable(new ColorDrawable(ContextCompat.getColor(ctx, android.R.color.transparent)));

    0 讨论(0)
提交回复
热议问题