Android - Getting the handle to components in a Custom Dialog

前端 未结 1 835
夕颜
夕颜 2021-01-22 05:36

I am trying to create a custom dialog box on the click of an option in the menu. I go on to start a new activity with the Intent pointing to customTextMessageDialog.

I

相关标签:
1条回答
  • 2021-01-22 05:49

    In your code you are setting the Activity's contentView to customDialog. You need to set the layout of your dialog to that layout. Read this.

    Do this:

    dialog.setContentView(R.layout.customdialog);
    
    0 讨论(0)
提交回复
热议问题