I\'m using 4list views with class extending Activity. I have to perform different list item click function. Can i use the following method code for it? So how to set a singl
Set different adapters for different list views. I take two list view for example. So take two adapter for these two. And setOnItemClick(context) will be like as below..
public void onItemClick(AdapterView<?> adv, View v, int arg2, long arg3) {
// TODO Auto-generated method stub
switch(adv.getId()) {
case R.id.ListView1:
Toast.makeText(this, "list1", Toast.LENGTH_LONG).show();
break;
case R.id.ListView2:
Toast.makeText(this, "list2", Toast.LENGTH_LONG).show();
break;
}
}