title: Android Custom Listview
body: <p>I have created custom listview which contain Imageview+TextView+Checkbox 
  Now  my problem is that i have to get which row's check box is checked. </p>
  
  <p>Xml row.xml </p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  </code></pre>
  
  <p></p>
  
  <pre><code>&lt;LinearLayout android:id="@+id/LinearLayout01"
      android:orientation="horizontal" android:layout_width="fill_parent"
      android:gravity="center_vertical" android:layout_height="60dip"&gt;
  
      &lt;LinearLayout android:id="@+id/LinearLayout03"
          android:orientation="vertical" android:gravity="center_vertical"
          android:layout_marginLeft="10dip" android:layout_height="60dip"
          android:layout_width="260dip"&gt;
  
          &lt;TextView android:id="@+id/desc" android:layout_width="fill_parent"
              android:layout_height="40dip" android:ellipsize="marquee"
              android:text="Text" android:textSize="20dip" android:textStyle="bold"
              android:gravity="center_vertical" android:textColor="@color/black" /&gt;
          &lt;TextView android:layout_width="wrap_content"
              android:layout_height="wrap_content" android:text="Phone number"
              android:id="@+id/phone_no" android:textColor="@color/black"&gt;&lt;/TextView&gt;
  
      &lt;/LinearLayout&gt;
      &lt;LinearLayout android:id="@+id/LinearLayout02"
          android:layout_width="fill_parent" android:gravity="center_vertical"
          android:layout_height="60dip"&gt;
  
          &lt;CheckBox android:layout_width="wrap_content"
              android:layout_height="wrap_content" android:id="@+id/chk_number"&gt;&lt;/CheckBox&gt;
      &lt;/LinearLayout&gt;
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p></p>
  
  <p>and Adapter is:</p>
  
  <pre><code>class ContactList extends ArrayAdapter{
  
      Activity context;
      public ContactList(Activity context) {
          super(context, R.layout.row,names);
          this.context = context;
      }
  
  public View getView(int position, View convertView, ViewGroup parent) {
      LayoutInflater inflater = context.getLayoutInflater();
      View row = inflater.inflate(R.layout.row, null);
  
      TextView Name = (TextView) row.findViewById(R.id.desc);
      TextView Number = (TextView) row.findViewById(R.id.phone_no);
      Name.setText(names.get(position));
      Number.setText(numbers.get(position));
  
      CheckBox checkboxnumberScramble = (CheckBox) row.findViewWithTag(R.id.chk_number);
      checkboxnumberScramble.setChecked(true);
      checkboxnumberScramble.setOnCheckedChangeListener(new OnCheckedChangeListener() {
          public void onCheckedChanged(CompoundButton buttonView,boolean isChecked) {
  
              if (isChecked) { 
                  setCheckboxflag(true);
              }else{
                  setCheckboxflag(false);
              }
           }
      });
  
      return (row);
      }
  }
  </code></pre>
  
  <p>I get exception on onCreate of my Activity .</p>