title: How to detect the place (column) where a list-view item has been clicked (android)?
body: <p>I have a list view in my android application which looks like the following: </p>
  
  <pre><code>&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:padding="5dp" &gt;
  
      &lt;TextView
          android:id="@+id/listname"
          android:layout_width="0dp"
          android:layout_height="wrap_content"
          android:layout_weight="0.5"
          android:text="@+id/label"
          android:textSize="50px" &gt;
      &lt;/TextView&gt;
      &lt;TextView
          android:id="@+id/listcurrent"
          android:layout_width="0dp"
          android:layout_height="wrap_content"
          android:layout_weight="0.2"
          android:text="@+id/label"
          android:textSize="50px" &gt;
      &lt;/TextView&gt;
      &lt;TextView
          android:id="@+id/listoffset"
          android:layout_width="0dp"
          android:layout_height="wrap_content"
          android:layout_weight="0.2"
          android:text="@+id/label"
          android:textSize="50px" &gt;
      &lt;/TextView&gt;
      &lt;ImageView
          android:id="@+id/logo"
          android:layout_width="100px"
          android:layout_height="100px"
          android:layout_marginLeft="5px"
          android:layout_marginRight="20px"
          android:layout_marginTop="5px"
          android:layout_weight="0.1"
          android:src="@drawable/icon4" &gt;
      &lt;/ImageView&gt;
  
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>which is being populated by some <code>ArrayAdapter</code>. Also in the main activity, I set a listener to detect if one of the list is being clicked:</p>
  
  <pre><code> this.list.setOnItemClickListener(new AdapterView.OnItemClickListener() {
  
              public void onItemClick(AdapterView&lt;?&gt; parentAdapter, View view, int position,
                                      long id) {
  
                  Log.i("MainActivity", "test");
  
                  // We know the View is a TextView so we can cast it
                  TextView clickedView = (TextView) view.findViewById(R.id.listname);
  
                  Toast.makeText(MainActivity.this, "Item with id [" + id + "] - Position [" + position + "] - Planet [" + clickedView.getText() + "]", Toast.LENGTH_SHORT).show();
  
              }
          });
  </code></pre>
  
  <p>where <code>this.list</code> is the list. All works fine so far, I see rows containing 4 columns; 3 text and one with an image. When I click on any position in a row I get the toast telling me which row I have just clicked. So far so good!</p>
  
  <p>But how to determine the <em>column</em> where I clicked? Did I click on the first <code>TextView</code>? Did I click on the image? How to find out?</p>