NullPointerException on EditText located in Dialog

后端 未结 2 1422
故里飘歌
故里飘歌 2021-01-17 05:39

Here is my email_dialog.xml layout:



        
2条回答
  •  广开言路
    2021-01-17 06:08

    You should do this:

     final EditText txtEA = (EditText) dialog.findViewById(R.id.txtEmailAddress5);
    

    You forgot to search for the txtEA in dialog.

提交回复
热议问题