Proper RadioGroup in PreferenceActivity

前端 未结 3 702
被撕碎了的回忆
被撕碎了的回忆 2021-01-20 07:27

Is it possible to define a RadioGroup in a PreferenceActivity? I could only find the ListView when offering multiple-choices.

Am I missing something?

3条回答
  •  感动是毒
    2021-01-20 08:05

    Is it possible to define a RadioGroup in a PreferenceActivity?

    You are welcome to create your own DialogPreference subclass that happens to host a RadioGroup, but it is unclear what benefit that would give you over a ListPreference.

    I could only find the ListView when offering multiple-choices.

    A ListPreference offers single choices, not multiple choices. There is a new MultiSelectListPreference for multiple choices, but that only showed up in API Level 11.

提交回复
热议问题