Problem creating a custom dialog

前端 未结 3 1566
傲寒
傲寒 2021-01-16 14:59

I have a problem creating a custom dialog. But I don\'t find the failure. Hopefully anybody can help me ...

protected Dialog onCreateDialog(int id) {
    Di         


        
3条回答
  •  长情又很酷
    2021-01-16 15:23

    Dialog dialog = new Dialog(contex); dialog.setContentView(R.layout.help_content);

    this works for me .. may be getapplicationcontext not getting context of the your main class.

提交回复
热议问题