Dynamically create CheckBoxPreferences

后端 未结 4 2209
孤城傲影
孤城傲影 2021-02-13 23:18

I am currently building out a list of rows with checkboxes dynamically using content from a web service. However, this ListView will need to do pretty much what a

4条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-02-14 00:06

    You need a ListView for that, a PreferenceActivity. As discussed in this link, PreferenceActivity should only be used for actually saving preferences.

    Instead you could either create a simple dialog with single or multiple choice options: http://developer.android.com/guide/topics/ui/dialogs.html

    Or use a ListView as in the API examples Google provides, they give a simple example:

    http://hi-android.info/docs/resources/samples/ApiDemos/src/com/example/android/apis/view/List10.html

提交回复
热议问题