tags:

views:

131

answers:

1

Hey all-

I am trying to put together a modal box with a scrollable list of checkable items and an OK and Cancel button at the bottom for the user to select filters from. It seems the simplest way to do things like this in Android is to reuse API components (widgets, layouts, etc) and the closest one I can find to this looks to be the ListPreference, which basically does exactly what I want (I can even work with storing the data in SharedPreferences).

The problem is that I'm not launching this modal box from a PreferenceActivity, but rather will be launching it from either of two activities: a ListActivity and a MapActivity. If a ListPreference would be possible here, that'd be really convenient, but otherwise any help getting me in the right direction would be great.

Thanks! Nick

+1  A: 

Try an AlertDialog, supplying it with your ListAdapter via AlertDialog.Builder.

CommonsWare
Thanks for the feedback. I just took a look into the AlertDialog and this should work perfectly for my application! The setMultiChoiceItems() method looks like it'll do just what I want. Thanks so much!
Bloudermilk