I need to enter a location for a survey. The location consists of a sub place(s) name and a main place name. An example is Paris (Sub place) and France (main place).
The sub place and main place options are represented in two AutoCompleteTextView
views. The requirements are that if I select a sub place first the main place is automatically filled in. If I select a main place first the available options in the sub place is filtered to only includes sub places linked to the main place selected. Example for main place France, sub place will filter options to Paris, Marseille, Lyon etc.
What kind of data structure should I use for a list of 20000 items each with a sub and main place? It is one to many data set.
- How do I change the available items in an
AutoCompleteTextView
dependent on the input of anotherAutoCompleteTextView
? - How do I implement this kind of problem? I am already seeing load time issues when opening the Activity with 20000 odd items in an
AutoCompleteTextView
.
Any suggestions please.