I am creating a custom array adapter, I now want to implement a function which handles clicking the view. I am having two options in mind, but I am wondering if there is a difference in performance/working speed or something?
Option 1, in the arrayAdapter itself:
row.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
}
});
Option 2, from the main Activity:
listView.setAdapter(adapter);
listView.setOnItemClickListener(new OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> arg0, View arg1, int arg2,
long arg3) {
// TODO Auto-generated method stub
}
});
Or are they exactly the same?