Question

I'm in the middle of developing a camera app, and what I need to do is provide a list of resolutions compatible with the user's device. Getting that list is no problem, I can just use the getSupportedPictureSizes() method. However the bit I'm stuck on is populating a ListPreference with that list.

The ListPreference is created in an .xml file which is used in my Settings PreferenceActivity by calling addPreferencesFromResource(R.xml.cam_settings). Any ideas how I can make this ListPreference populate using the list of supported picture sizes?

Thanks in advance for any help.

Was it helpful?

Solution

i guess you need to populate the ListPreference programatically. here is a LINK

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top