Here is my problem. I would like to have an AlertDialog that have a title and a positive button. I want to describe the content of the AlertDialog in a XML file (except for the title/button).
I have created a file called dlg_addpwd.xml
in my layout resources.
Here is the code I'm using:
AlertDialog alert = new AlertDialog.Builder(this);
alert.setTitle("Password access");
alert.setView(findViewById(R.layout.dlg_addpwd));
alert.setPositiveButton("Add", listenAddPwdDlg);
alert.show();
I guess the line
alert.setView(findViewById(R.layout.dlg_addpwd));
is wrong, isn't it ? So the main idea of my question is: how to define as a view for an AlertDialog a view described in a XML file?
Thanks
Vincent