title: Onclick not able to detect in listrow in android
body: <p><strong>What is happening</strong>:: </p>
  
  <ul>
  <li>I am not able to detect on click for my listrow for a listview</li>
  <li>I am gussing it has to do with focusability because if i use a
  different xml for row i am able to detect onclick</li>
  <li>So how can i detect onclick for my adapter row as mentioned below</li>
  </ul>
  
  <hr>
  
  <p><strong>My Xml</strong>::</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:orientation="vertical" &gt;
  
      &lt;TableLayout
          android:layout_width="fill_parent"
          android:layout_height="fill_parent"
          android:layout_marginBottom="5dp"
          android:layout_marginLeft="5dp"
          android:layout_marginRight="5dp"
          android:layout_marginTop="5dp"
          android:background="@drawable/listview_bg"
          android:orientation="vertical"
          android:shrinkColumns="0"
          android:stretchColumns="1" &gt;
  
          &lt;LinearLayout
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_marginBottom="4dp"
              android:layout_marginLeft="5dp"
              android:layout_marginRight="5dp"
              android:orientation="horizontal" &gt;
  
              &lt;TextView
                  android:id="@+id/txtBufRestName"
                  android:layout_width="wrap_content"
                  android:layout_height="match_parent"
                  android:layout_weight="1"
                  android:gravity="bottom"
                  android:text="Restaurant Name"
                  android:textColor="@android:color/holo_blue_dark"
                  android:textSize="18sp" /&gt;
  
              &lt;ImageView
                  android:id="@+id/imgBufDistance"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:layout_gravity="bottom"
                  android:layout_marginRight="1dp"
                  android:src="@drawable/distance_flag" /&gt;
  
              &lt;TextView
                  android:id="@+id/txtBufDistance"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:layout_gravity="bottom"
                  android:text="1600"
                  android:textColor="@android:color/holo_blue_dark"
                  android:textSize="20sp" /&gt;
  
              &lt;TextView
                  android:id="@+id/txtBufDistanceUnit"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:layout_gravity="bottom"
                  android:text="km"
                  android:textColor="@android:color/holo_blue_dark"
                  android:textSize="12sp" /&gt;
          &lt;/LinearLayout&gt;
  
          &lt;TableRow
              android:layout_width="match_parent"
              android:layout_height="match_parent"
              android:layout_marginBottom="4dp"
              android:layout_marginLeft="5dp"
              android:layout_marginRight="5dp" &gt;
  
              &lt;TextView
                  android:id="@+id/txtBufType"
                  android:layout_span="3"
                  android:layout_weight="1"
                  android:text="Buffet Type"
                  android:textColor="#636262"
                  android:textSize="12sp" /&gt;
          &lt;/TableRow&gt;
  
          &lt;LinearLayout
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_marginBottom="4dp"
              android:layout_marginLeft="5dp"
              android:layout_marginRight="5dp"
              android:orientation="horizontal" &gt;
  
              &lt;ImageView
                  android:id="@+id/restRatingBar"
                  android:layout_width="61dp"
                  android:layout_height="wrap_content"
                  android:layout_gravity="left"
                  android:gravity="left"
                  android:src="@drawable/star_5" /&gt;
  
              &lt;TextView
                  android:layout_width="0dp"
                  android:layout_height="0dp"
                  android:layout_weight="1" /&gt;
  
              &lt;TextView
                  android:id="@+id/txtBufTime"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:text="12:00 Am to 12:00 Pm"
                  android:textColor="#636262"
                  android:textSize="12sp" /&gt;
          &lt;/LinearLayout&gt;
  
          &lt;LinearLayout
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_marginBottom="4dp"
              android:layout_marginLeft="5dp"
              android:layout_marginRight="5dp"
              android:orientation="horizontal" &gt;
  
              &lt;LinearLayout
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:layout_weight="1.82"
                  android:gravity="center_horizontal|center"
                  android:orientation="vertical" &gt;
  
                  &lt;TextView
                      android:id="@+id/txtOnlinePrice"
                      android:layout_width="wrap_content"
                      android:layout_height="wrap_content"
                      android:layout_gravity="center"
                      android:text="Txt" /&gt;
  
                  &lt;Button
                      android:id="@+id/btnOnlinePrice"
                      android:layout_width="100dp"
                      android:layout_height="48dp"
                      android:background="@drawable/btn_online_selector"
                      android:gravity="center_horizontal|center"
                      android:text="   Buy Now"
                      android:textColor="@android:color/black"
                      android:textSize="12sp" /&gt;
              &lt;/LinearLayout&gt;
  
              &lt;LinearLayout
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:layout_weight="2.07"
                  android:gravity="center_horizontal|center"
                  android:orientation="vertical" &gt;
  
                  &lt;TextView
                      android:id="@+id/txtReservePrice"
                      android:layout_width="wrap_content"
                      android:layout_height="wrap_content"
                      android:layout_gravity="center"
                      android:text="Txt" /&gt;
  
                  &lt;Button
                      android:id="@+id/btnReservePrice"
                      android:layout_width="100dp"
                      android:layout_height="48dp"
                      android:layout_marginLeft="2dp"
                      android:background="@drawable/button_reserve_selector"
                      android:gravity="center_horizontal|center"
                      android:text="Reserve"
                      android:textColor="@android:color/black"
                      android:textSize="12sp" /&gt;
              &lt;/LinearLayout&gt;
          &lt;/LinearLayout&gt;
  
          &lt;ImageView
              android:id="@+id/imgBufLogo"
              android:layout_width="fill_parent"
              android:layout_height="match_parent"
              android:background="@android:color/black"
              android:scaleType="fitXY"
              android:src="@drawable/ic_launcher" /&gt;
      &lt;/TableLayout&gt;
  
      &lt;TextView
          android:id="@+id/txtBufOffId"
          android:layout_width="0dp"
          android:layout_height="0dp"
          android:visibility="invisible" /&gt;
  
      &lt;TextView
          android:id="@+id/txtDescription"
          android:layout_width="0dp"
          android:layout_height="0dp"
          android:visibility="invisible" /&gt;
  
      &lt;TextView
          android:id="@+id/txtRating"
          android:layout_width="0dp"
          android:layout_height="0dp"
          android:visibility="invisible" /&gt;
  
  
  &lt;/LinearLayout&gt;
  </code></pre>