title: How to scroll from code to make a view shown in the screen?
body: <p>I have a ScrollView which contains 1 button and 3 TextViews. Currently the button and the first TextView is shown on the screen and they occupy the whole screen. The second TextView is below the first TextView and is outside of the screen. When user clicks the button, I want the code to scroll the second TextView to be shown on the top of the screen. Could someone tell me how to make it? Thanks!</p>
  
  <pre><code>&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  android:layout_width="fill_parent"
  android:layout_height="wrap_content" 
  android:orientation="vertical"
  &gt;
  
  
  &lt;ScrollView android:id="@+id/scrllvw"
            android:layout_width="fill_parent" 
            android:layout_height="wrap_content"
            android:fadingEdge="none"
             &gt;
  
         &lt;LinearLayout android:layout_width="fill_parent" 
            android:layout_height="wrap_content"
            android:orientation="vertical" &gt;
             &lt;Button android:layout_width="fill_parent" 
                android:layout_height="wrap_content"
                android:id="@+id/test" /&gt;
             &lt;TextView android:layout_width="fill_parent" 
                android:layout_height="wrap_content"
                android:id="@+id/text1" /&gt;
             &lt;TextView android:layout_width="fill_parent" 
                android:layout_height="wrap_content"
                android:id="@+id/text2" /&gt;           
             &lt;TextView android:layout_width="fill_parent" 
                android:layout_height="wrap_content"
                android:id="@+id/text3" /&gt;           
          &lt;/LinearLayout&gt;
  &lt;/ScrollView&gt;
  &lt;/LinearLayout&gt;
  </code></pre>