How can i check the checkbox onItemClickListener event of listivew in android?
<p>Explanation:
           I tried more but not got the perfect solution as per my expectation.
I want to check by checbox on the click of listview row in BaseAdapter??.</p>

<p>AcCategoryAdapter.java</p>

<pre><code>public class AcCategoryAdapter extends BaseAdapter{

    private Activity activity;
    private List&lt;AcCategory&gt; acCategoryList;
    private LayoutInflater inflater;

    public AcCategoryAdapter(Activity activity,List&lt;AcCategory&gt; acCategoryList){
        this.activity=activity;
        this.acCategoryList=acCategoryList;
        inflater=(LayoutInflater)activity.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
    }

    @Override
    public int getCount() {
        return this.acCategoryList.size();
    }

    @Override
    public Object getItem(int position) {
        return this.acCategoryList.get(position);
    }

    @Override
    public long getItemId(int position) {
        return position;
    }

    private class Holder{
        TextView txtCategoryName;
        ImageView ivImg;
        CheckBox cbCooling;
    }

    @Override
    public View getView(final int position, View convertView, ViewGroup parent) {

        final Holder holder;
        if(convertView==null){
            holder=new Holder();
            convertView=inflater.inflate(R.layout.ac_problems_list,parent,false);

            holder.txtCategoryName=(TextView)convertView.findViewById(R.id.txt_cooling);
            holder.ivImg=(ImageView)convertView.findViewById(R.id.iv_img);
            holder.cbCooling=(CheckBox)convertView.findViewById(R.id.cb_cooling);

            convertView.setTag(holder);
        }
        else{
            holder=(Holder)convertView.getTag();
        }
        final AcCategory acCategory=acCategoryList.get(position);
        holder.txtCategoryName.setText(acCategory.getName());

//        convertView.setOnClickListener(new View.OnClickListener() {
//            @Override
//            public void onClick(View v) {
//                Toast.makeText(activity,acCategory.getName(), Toast.LENGTH_SHORT).show();
//                holder.cbCooling.setChecked(true);
//            }
//        });
        return convertView;
    }
</code></pre>

<p>list_row.xml</p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/ll_cooling"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"

    android:orientation="horizontal"
    android:padding="10dp"&gt;

    &lt;ImageView
        android:id="@+id/iv_img"
        android:layout_width="25dp"
        android:layout_height="25dp"
        android:contentDescription="@string/img_desc"
        android:layout_gravity="center_vertical"
        android:src="@drawable/ic_cooling" /&gt;

    &lt;RelativeLayout
        android:layout_width="wrap_content"
        android:layout_height="match_parent"&gt;

        &lt;TextView
            android:id="@+id/txt_cooling"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentLeft="true"
            android:layout_alignParentStart="true"
            android:layout_centerVertical="true"
            android:layout_marginLeft="10dp"
            android:layout_marginRight="10dp"
            android:text="@string/txt_cooling"
            android:textSize="18sp" /&gt;

        &lt;CheckBox
            android:id="@+id/cb_cooling"
            android:layout_width="wrap_content"
            android:layout_height="25dp"
            android:layout_alignParentRight="true"
            android:layout_alignParentEnd="true"
            android:layout_centerVertical="true"
            android:focusable="false"
            android:focusableInTouchMode="false"
            android:button="@drawable/checkbox_checked"
            android:checked="false" /&gt;
    &lt;/RelativeLayout&gt;

&lt;/LinearLayout&gt;
</code></pre>

<p>above is the list row where i have ImageView,TextView and CheckBox and it is inflated into my adapter</p>

<p>Here is the call of adapter from the activity</p>

<pre><code>lvProblem.setOnItemClickListener(new AdapterView.OnItemClickListener() {
            @Override
            public void onItemClick(AdapterView&lt;?&gt; parent, View view, int position, long id) {
                Log.e(TAG,"LISTVIEW SELECTED ITEM:-"+acCategoryList.get(position).getName());
            }
        });
</code></pre>

<p>Additional, i get the functionality like it's check from the onItemClickListener and checkbox itself.</p>

<p>Please, help me to solve out this problem.</p>