I have a simple ArrayAdapter. I want to set up a listener for every row click of my list such that a new Activity opens. How would I do that? My ArrayAdapter code -
Simply implement AdapterView.OnItemClickListener.
@Override
public void onItemClick(AdapterView> adapterView, View view, int pos, long l) {
Intent i = new Intent(this, ProductActivity.class);
i.putExtra("item_id", manager.getItemIdAtIndex(pos));
startActivity(i);
}
Then just set the class with that method as the onItemClickListener in your adaptor.