How can I make the button in BaseAdapter in listView shows alertDialog, I tried that but it Stopped work unexpected (RunTime Error) my code is shown below .
any suggesti
First thing your alertDialog is not even initialised.. so NPE .. and when you create it inside an Adapter make sure to use activity context and not ApplciatioContext
AlertDialog alertDialog = new AlertDialog.Builder(YourACtivity.this);
the above line should not be in the class level.. it should be inside getView() method... and use your activity instance as Context.. something like nameOfYourActivity.this