title: How to return the index of child in Layout?
body: <p>I have the following situation - HorizontalScrollView (HSV), inside HSV - LinearLayout and inside it number of buttons - the code is here:</p>
  
  <pre><code>&lt;HorizontalScrollView
          android:id="@+id/Footer"
          android:orientation="horizontal"
          android:layout_width="fill_parent"
          android:layout_height="0dp"
          android:layout_weight="1.5"
          android:background="@drawable/footer_bg"
          android:scrollbars="none"
          android:fadingEdge="none"
          &gt;
  
          &lt;LinearLayout
              android:id="@+id/hsvLinearLayout"
              android:orientation="horizontal"
              android:layout_width="fill_parent"
              android:layout_height="fill_parent"
              &gt;
  
              &lt;Button
                  android:id="@+id/today"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:drawableTop="@drawable/today"
                  android:drawablePadding="0sp"
                  android:gravity="center_horizontal|bottom"
                  android:textSize="8sp"
                  android:text="@string/today"
                  android:onClick="getRSSNews"
                  /&gt;
  
              &lt;Button
                  android:id="@+id/life"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:drawableTop="@drawable/life"
                  android:drawablePadding="0sp"
                  android:gravity="center_horizontal|bottom"
                  android:textSize="8sp"
                  android:text="@string/life"
                  android:onClick="getRSSNews"
                  /&gt;
  
              &lt;Button
                  android:id="@+id/corner"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:drawableTop="@drawable/corner"
                  android:drawablePadding="0sp"
                  android:gravity="center_horizontal|bottom"
                  android:textSize="8sp"
                  android:text="@string/corner"
                  android:onClick="getRSSNews"
                  /&gt;
  
              &lt;Button
                  android:id="@+id/banks"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:drawableTop="@drawable/banks"
                  android:drawablePadding="0sp"
                  android:gravity="center_horizontal|bottom"
                  android:textSize="8sp"
                  android:text="@string/banks"
                  android:onClick="getRSSNews"
                  /&gt;
  
              &lt;Button
                  android:id="@+id/it"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:drawableTop="@drawable/it"
                  android:drawablePadding="0sp"
                  android:gravity="center_horizontal|bottom"
                  android:textSize="8sp"
                  android:text="@string/it"
                  android:onClick="getRSSNews"
                  /&gt;
  
              &lt;Button
                  android:id="@+id/fun"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:drawableTop="@drawable/fun"
                  android:drawablePadding="0sp"
                  android:gravity="center_horizontal|bottom"
                  android:textSize="8sp"
                  android:text="@string/fun"
                  android:onClick="getRSSNews"
                  /&gt;
  
          &lt;/LinearLayout&gt;
  
      &lt;/HorizontalScrollView&gt;
  </code></pre>
  
  <p>Is there a way to get the position(index) of the button, on which has been clicked!</p>