0
<products>
<product productName="Invega"/>                 
<product productName="Aciphex"/> 
<product productName="Doribax"/>
<product productName="Duragesic"/>
<product productName="Cetraxal"/>
<product productName="Caelyx"/>
<product productName="Axert"/>
<product productName="Aci-jel"/>
<product productName="Concerta"/>
<product productName="Elmiron"/>
</product>

Above is my XML file. I want to parse it with listview. My list view contains a checkbox. I want to populate the check box with the productnames. I tried many ways to do this, but I failed. Can anybody provide the code for this? Please help me.

4
  • "i want to populate the check box with the productnames" - Do you really mean 'checkbox'? A checkbox can only contain a check or not, it can't contain text. Commented Mar 23, 2011 at 6:02
  • Are you using android list activity or custom adapters? Commented Mar 23, 2011 at 6:03
  • and where is the XML file located? Commented Mar 23, 2011 at 6:05
  • BTW you are missing a s in the closing tag. Commented Mar 23, 2011 at 16:12

1 Answer 1

1

If you want to show text along with Check Box, then you should use CheckedTextView Control of android. As, Check Box alone doesn't support text.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.