0

I am just learning Android.

I have a listview with data taken from the table 'alphabet' on the database server. Suppose the table consists of id A, B, and C...

  1. Now when I select an item of ID A, the listview will be filled with data from different tables, eg. table 'number'
  2. Then, when I select an item of ID B, the same listview will be filled with different data again, eg. table 'symbol'
  3. And when I select an item of ID C, another activity will open (not listview) and fill data from other tables as well more or less as it is

Is there a tutorial describing the same problem I mentioned above? Thanks very much!

James Taylor
  • 6,158
  • 8
  • 48
  • 74
Nurcahyadin
  • 451
  • 4
  • 2

1 Answers1

-1

To achieve this, you need to use setOnItemclickListener() of Listview. By using this,You can get on which Item (A,B or C) , User have clicked. and on based on that,With switch case,you can populate your data accordingly. For more info on setOnItemclickListener(), Refer this link : setOnItemClickListener on custom ListView

Community
  • 1
  • 1
Aditi Parikh
  • 1,522
  • 3
  • 13
  • 34