質問

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.

役に立ちましたか?

解決

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

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top