0

let me go deep into this. I've put a listview in my main activity which contains items that each of them starts another specific activity when it's clicked. As you know each custom adapter class requires a list. I create the list in my activity and send it to adapter. If I want each item to refer to another activity with another listview but different items, how may I do that? Should I put extra the list of the next activity for each item in main adapter? I hope you understand what I'm looking for. Thank you in advance.

Hamidreza
  • 1,360
  • 11
  • 18
  • Does the next activity not have access to the items in the first list? Is that why you need to put the items in the `Intent`? – Dan S Jun 05 '15 at 18:40
  • No, it doesn't. They're like different menus. When I click on an item it goes to another activity with different menus. But the activity looks same for all items but different menus. I want to use one activity for all items on the main listview, that's why I'm asking should I use put extra? – Hamidreza Jun 05 '15 at 19:00
  • It sounds more like replacing the underlying adapter or data in the current list view would be better, the previous adapter or data can be kept as a cache. – Dan S Jun 05 '15 at 19:25
  • that's exactly what I'm looking for how may I do that? Should I create all the lists in my main activity? – Hamidreza Jun 06 '15 at 06:27

1 Answers1

0

Roughly this is what I'm hearing: I want to make a ListView Adapter in my touch event handler, which is OK to do, just create the new adapter and call myListView.setAdapter(myAdapter).

Dan S
  • 9,139
  • 3
  • 37
  • 48