Can\'t use ArrayAdapter in a custom dialog.
This is the error I am getting
Using this won't work since you are in the scope of the OnClickListener.
this
OnClickListener
You should try getContext() or getApplicationContext() instead of this.
getContext()
getApplicationContext()