views:

44

answers:

1

In my application, I am going to create a few listviews that are dependent on the listview before it. For example,

1st list has these items
Illinois
Indiana

Then, depending on user choice, will go next screen, let's say, it contains a submenu of each type of school,that may be different or may be the same to other states

Click Illinois, get 2nd list with these
State Universities
High Schools
Private Universities

Click Indiana, get 2nd list with these
Community Colleges
High Schools
State Universities

Then once a user selects one of these, a similar list will be generated. Let's say Indiana is selected, and then State Universities

3rd List
Purdue University
Indiana University
Ball State

Finally, when the user selects one of these, a window showing some simple statistics would be shown, such as Number of students, location, mascot, etc. It would also keep track of what state it was in, and what 'type' of school it was.

What I want to know, is how to populate these different lists dynamically as the user goes on? I don't know what the best of doing this is, and I seem to be looking in the all the wrong places because I keep getting stuck. Once all the data is added into whatever structure is used, it will be static. I basically just need help as to how to code information into some sort of hashtable or anything of the sort that can be easily referenced, and later when the Application is updated, be able to add more schools/states/submenus etc. Any sort of help would be appreciated.

A: 

u have a starting state and many possibe goal states.. well u have to do a switch case .. if in an activity u hav the listview with Illinois,Indiana in it.. then on a click on each of the list items get the id of the clicked view in the listview .. and launch an intent to get to the next activity with another listview .. and so on and on..

bala singareddy