• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

CheckBox in custom layout in ListView are automatically changing while scrolling in listView

 
Kishor Joshi
Ranch Hand
Posts: 674
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there.

I have one problem that while I am Scroll down/up a custom listview layout then one of item in my custom layout is checkbox which is automatically getting selected in random up/down scroll.

This is my adapter code


this is my custom xml layout


all thing is work fine that setting listActivity adapter and else
But List Scrolling will sometime change some checkbox to checked?


Where I am wrong?
 
rajat ghai
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How to add checkbox to andoroid listview?
You need to create custom adapter for listview.

Okay then you need to create listview and pass the adapter to create checkbox in listview. Find the xml file below to get layout source code.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic