Why do you create a new class for your layout? You can just create a layout xml and inflate it inside your adapter's getView method.
If you do it like that, you can set the click listener inside the getview method of the adapter, and from there you have access to both the arraylist and the adapter.