title: onclick checkbox in listview
body: <p>I have looked other questions but none of them fulfill what I need.</p>
  
  <p>I have a listview showing a list of objects (alarms) that have some textviews and a checkbox. As you can imagine, this checkbox is to activate and deactivate that alarm.</p>
  
  <p>When I arrive to this screen (alarms list), it checks the active state in the database, so some of the checkboxes are checked and some other not.</p>
  
  <p>What I need is to click in the checkbox and change the state in the database for that alarm at the moment. Not checking the state of all checkboxes before leaving the screen!!! I have read solutions using selectedItems or Holder class, but are not suitable for me.</p>
  
  <p>I think I need to define the onClick event in the checkbox (in the AlarmAdapter), but the list of alarms is in the activity (ListAlarms), so I don't know how to "tell" the list of alarms "this is the checkbox (alarm) that has been clicked, then update its active state".</p>
  
  <p>Any idea? Maybe controlling the action in the row (with OnItemClickListener) instead of clicking the checkbox? </p>
  
  <p>Thanks a lot!!!</p>