As far as I know, ArrayAdapter is used to handle data for ListView’s content. I have two ListViews (in the same activity) that contain the same data, with two different behaviors (should be handle in two different onListItemClick() ) though. Can I use the same ArrayAdapter for both of them? I can check this but I’m not sure it will create bug if I use the same Adapter.
Furthermore,if I don’t extend ListActivity as in this tutorial, how can I handle onListItemClick() events from those ListViews?
Thank in advance
Yes, you can use the same Adapter. And you can handle clicks by implementing
.setOnItemClickListener()for listView1 and listView2.