title: Android View error
body: <p>I am getting the following two errors located in my code below <code>(CheckBox) v.isChecked();</code>:</p>
  
  <p><strong>Type mismatch: cannot convert from CheckBox to boolean</strong></p>
  
  <p><strong>The method isChecked() is undefined for the type View</strong></p>
  
  <pre><code>for(final int i = 0; i &lt; setOfCheckBoxes.length; i++){
  
                                                  setOfCheckBoxes[i].setOnClickListener(new View.OnClickListener(){    
        public void onClick(View v) {      
       selected[i] = (CheckBox) v.isChecked();
       }
     });
   }
  </code></pre>
  
  <p>Not sure what I am doing wrong and if anyone has any ideas please let me know. </p>
  
  <p>Thanks!</p>