Yes, one query to get the categories (cities), then, once a city is
selected, another query to get the addresses. Or you could preload the
entire data set and do your own filtering in memory - depending on how large
the data set is.

Take a look at ListPreference source code - if you wanted the list selection
to use an alert dialog popup.

Or you could use a PreferenceCategory and insert Prefrerence entries
representing cities - if you wanted to show all the cities within the same
screen.

-- Kostya

2011/6/10 Andrei <entre...@gmail.com>

> Hi all. Help me find the right path.
> I have a database in it one table, the table has a column of city and
> address when opening the database shows all of the city.
> I want to create a preference, where you can select a city and display
> a list of addresses only the selected city.
> I have to write 3 different SQL query? And depending on the setting of
> output result, to cause a particular query in the database. Right?
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to