I have a dialog that is crashing immediately upon calling LoadLayout. There is one spinner on the dialog, and if I remove it, the dialog loads just fine. If I add the spinner back into the dialog, it crashes as before.
Error message starts with:
srccheck_activity_create (B4A line: 25)
Activity.LoadLayout("SrcTest")
java.lang.RuntimeException: java.lang.RuntimeException: Don't call setOnClickListener for an AdapterView. You probably want setOnItemClickListener instead
.
.
.
.
Please help!
Update: I added the subject dialog to a bare bones test app, and it loads just fine - so I am now really baffled with this issue...
Update2: I'd been adding the spinner with the Designer. As I noted before, when I remove the spinner and run the program the dialog comes up just fine. If I then proceed to add the spinner in code (with AddView) the dialog seems to be OK. Go figure... I have a number of dialogs with Designer installed spinners and this is the first time I've encountered this problem.
Error message starts with:
srccheck_activity_create (B4A line: 25)
Activity.LoadLayout("SrcTest")
java.lang.RuntimeException: java.lang.RuntimeException: Don't call setOnClickListener for an AdapterView. You probably want setOnItemClickListener instead
.
.
.
.
Please help!
Update: I added the subject dialog to a bare bones test app, and it loads just fine - so I am now really baffled with this issue...
Update2: I'd been adding the spinner with the Designer. As I noted before, when I remove the spinner and run the program the dialog comes up just fine. If I then proceed to add the spinner in code (with AddView) the dialog seems to be OK. Go figure... I have a number of dialogs with Designer installed spinners and this is the first time I've encountered this problem.
Last edited: