title: How to get ListView ID when CheckBox is checked?
body: <p>I currently have a custom ListView. Each item inside that ListView contains an ImageView, two TextViews and a CheckBox. Below is a screenshot of the list.</p>
  
  <p><img src="https://i.stack.imgur.com/QjGzt.png" alt="Screenhot"></p>
  
  <p>I am capture when the user clicks on the CheckBox with the snipped below, however, I need the _id of the item that was checked.</p>
  
  <pre><code>// Get the CheckBox view
  CheckBox routine_quick = (CheckBox) view.findViewById(R.id.checkBox_quick);
  
  // Set checked value depending on the database results
  if (cursor.getInt(cursor.getColumnIndexOrThrow("quick")) == 1) {
      routine_quick.setChecked(true);
  } else {
      routine_quick.setChecked(false);
  }
  
  // Create onClickListener
  routine_quick.setOnClickListener(new View.OnClickListener() {
      @Override
      public void onClick(View v) {
          if (((CheckBox) v).isChecked()) {
              // ADD QUICK TO DATABASE
  
          } else {
              // REMOVE QUICK FROM DATABASE
          }
      }
  });
  </code></pre>
  
  <p>However, with this method, the only parameter I get is "View v".</p>
  
  <p>I tried searching but I only find examples of how to set the checkbox to checked when the ListView is clicked.</p>
  
  <p>How can I get the _id when the CheckBox is clicked? Any help is appreciated. Thank you!</p>