Proper RadioGroup in PreferenceActivity

前端 未结 3 465
广开言路
广开言路 2021-01-20 07:59

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:02

    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.

提交回复
热议问题