lundi 22 décembre 2014

how to create checkbox lists according to xml in android?

so I have an xml that I want to parse in android lets say for example the xml is constructed something like this:



<question name="q1">
<ans1> answer1 </ans1>
<ans2> answer2 </and2>

...


and so on with more questions and more answers. I want the user to click a button in an activity and a fragment will appear with all these questions as questions and checkboxes as answers (so he can select more than one answer if he chooses).


I have already parsed the xml to a hashmap so that every questions number has its multiple answers .


Im a beginner in android , so is it possible to create a listView where every row in the list will be a question and checkboxes of answers ?


If not how would you do it ?


ofcourse when the user click ok the activity remembers the answers the user chose in the fragment that poped up





Aucun commentaire:

Enregistrer un commentaire