I am trying to show two custom listviews on one activity. But I am confused how to handle onListItemClick and most important how I can set the ID
@id/android:list
for both the lists on the same activity?
If any one have tried with two list views on single activity, any link, sample code will be helpful. Thanks in advance…
Just define two ListViews in your XML, like:
In your code use this command to assign your Lists
and for both of them set a different
onItemClickListener, for example this way:and you are done 🙂 This way, your activity don’t need to extend
ListActivity, justActivity.