title: Get child location in HorizontalScrollView and scroll to it
body: <p>Looks like I can't get or set any position or scrolling amount in my simple layout:</p>
  
  <pre><code>// Relative layout - main_layout
  &lt;HorizontalScrollView
      android:id="@+id/MenuScroll"
      android:layout_width="fill_parent"
      android:layout_height="wrap_content"
      android:fillViewport="true"
      android:scrollbars="none" &gt;
  
      &lt;LinearLayout
          android:layout_width="wrap_content"
          android:layout_height="48dp"
          android:orientation="horizontal"
          android:layout_gravity="center"
          android:padding="0dp" &gt;
  
          &lt;Button
              android:id="@+id/button1"
              android:layout_width="150dp"
              android:layout_height="fill_parent" /&gt;
  
          &lt;Button
              android:id="@+id/button2"
              android:layout_width="150dp"
              android:layout_height="fill_parent" /&gt;
  
          &lt;Button
              android:id="@+id/button3"
              android:layout_width="150dp"
              android:layout_height="fill_parent" /&gt;
  
          &lt;Button
              android:id="@+id/button4"
              android:layout_width="150dp"
              android:layout_height="fill_parent" /&gt;
  
          &lt;Button
              android:id="@+id/button5"
              android:layout_width="150dp"
              android:layout_height="fill_parent" /&gt;
  
      &lt;/LinearLayout&gt;
  &lt;/HorizontalScrollView&gt;
  // End of RelativeLayout - main_layout
  </code></pre>
  
  <p>What I want in my <code>MainActivity</code> is to get the position of any button inside the <code>HorizontalScrollView</code> and scroll to that position. At the moment I can't get the left value (it's always 0) and if I try to <code>scrollTo</code> the <code>HorizontalScrollView</code> it just doesn't, regardless of what the value for x or y is.</p>
  
  <pre><code>// imports
  public class MainActivity extends Activity {
  @Override
  public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
  
      setContentView(R.layout.main_layout);
  
          final Button button3 = (Button)findViewById(R.id.button3);
          Rect rectf = new Rect();
          button3.getLocalVisibleRect(rectf);
          Log.i("Left: ", String.valueOf(rectf.left)); // it is always 0
  
          HorizontalScrollView MenuScroll = (HorizontalScrollView)findViewById(R.id.MenuScroll);
          // Trying to scroll to X=100 but it doesn't
          MenuScroll.scrollTo(100, MenuScroll.getBottom());
      }
  }
  </code></pre>
  
  <p>So, as I said, I can't get the left position for my button and either can scroll to some X position in my <code>HorizontalScrollView</code>. Is this possible?</p>