title: Scrollview not start from top
body: <p>I have an activity that has a <code>ScrollView</code>, and for some reason when the activity loads, <strong>it does not start from the top but somewhere in the middle.</strong> I tried to work this out in the code but that was unsuccessful. I even tried in the XML by adding </p>
  
  <pre><code>android:windowSoftInputMode="stateHidden"
  </code></pre>
  
  <p>Since I have quite a few EditText in that Acitivity, but all attempts have been unsuccessful.</p>
  
  <p>Below is the layout code:</p>
  
  <pre><code>Any help would be greatly appreciated
  
  Update:
  &lt;ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
      android:id="@+id/scrollProfile"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:alpha="0.9"
  
  
      android:background="#ffffff" &gt;
  
  &lt;RelativeLayout
       android:id="@+id/main"
          android:layout_width="match_parent"
          android:layout_height="797dp" 
          android:descendantFocusability="beforeDescendants" &gt;
  
      &lt;TextView
          android:id="@+id/tASearchDistance"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_centerHorizontal="true"
          android:layout_marginTop="39dp"
          android:gravity="left"
          android:text="Profile Creation"
          android:textColor="#ffffff"
          android:textSize="28sp"
          android:textStyle="bold"
          android:typeface="sans" /&gt;
  
      &lt;TextView
          android:id="@+id/tSex"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_below="@+id/etxtname"
          android:layout_centerHorizontal="true"
          android:layout_marginTop="15dp"
          android:text="Upload your Profile Picture"
          android:textColor="#f2f2f2"
          android:textSize="18sp"
          android:textStyle="bold"
          android:typeface="sans" /&gt;
  
      &lt;RadioGroup
          android:id="@+id/radioGroup1"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_alignLeft="@+id/etxtheadline"
          android:layout_below="@+id/texperience" &gt;
  
          &lt;RadioButton
              android:id="@+id/rimale"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:checked="true"
              android:text="Male"
              android:textColor="#000" /&gt;
  
          &lt;RadioButton
              android:id="@+id/rifemale"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:text="Female"
              android:textColor="#000" /&gt;
      &lt;/RadioGroup&gt;
  
      &lt;SeekBar
          android:id="@+id/sbseekBarDistance"
          android:layout_width="250dp"
          android:layout_height="wrap_content"
          android:layout_below="@+id/textView12"
          android:layout_centerHorizontal="true"
          android:layout_marginTop="11dp"
          android:progress="50" /&gt;
  
      &lt;RadioGroup
          android:id="@+id/radioGroup3"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_alignLeft="@+id/tAge"
          android:layout_below="@+id/tAge" &gt;
  
          &lt;RadioButton
              android:id="@+id/rlmale"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:checked="true"
              android:text="Male"
              android:textColor="#000" /&gt;
  
          &lt;RadioButton
              android:id="@+id/rlfemale"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:text="Female"
              android:textColor="#000" /&gt;
      &lt;/RadioGroup&gt;
  
      &lt;SeekBar
          android:id="@+id/sbseekBarMinimumAge"
          android:layout_width="250dp"
          android:layout_height="wrap_content"
          android:layout_below="@+id/tName4"
          android:layout_centerHorizontal="true"
          android:layout_marginTop="11dp"
          android:progress="25" /&gt;
  
      &lt;TextView
          android:id="@+id/tvseekBarDistanceValue"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_alignRight="@+id/tvMinAge"
          android:layout_below="@+id/sbseekBarDistance"
          android:text="50"
          android:textAppearance="?android:attr/textAppearanceMedium"
          android:textColor="#000"
          android:textSize="18sp"
          android:typeface="serif" /&gt;
  
      &lt;TextView
          android:id="@+id/textView12"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_below="@+id/radioGroup1"
          android:layout_centerHorizontal="true"
          android:layout_marginTop="19dp"
          android:text="Individual search distance "
          android:textAppearance="?android:attr/textAppearanceMedium"
          android:textColor="#3D3C3A"
          android:textSize="18sp"
          android:textStyle="bold"
          android:typeface="sans" /&gt;
  
      &lt;SeekBar
          android:id="@+id/sbseekBarMaximumAge"
          android:layout_width="250dp"
          android:layout_height="wrap_content"
          android:layout_below="@+id/textView14"
          android:layout_centerHorizontal="true"
          android:layout_marginTop="11dp"
          android:progress="50" /&gt;
  
      &lt;TextView
          android:id="@+id/conditions"
          android:layout_width="280dp"
          android:layout_height="130dp"
          android:layout_below="@+id/btnConfirm"
          android:layout_centerHorizontal="true"
          android:layout_marginBottom="7dp"
          android:layout_marginTop="7dp"
          android:alpha="0.5"
          android:gravity="center"
          android:text="@string/disclaimer"
          android:textColor="#000"
          android:textSize="12sp"
          android:typeface="sans" /&gt;
  
      &lt;TextView
          android:id="@+id/tAge"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_above="@+id/radioGroup1"
          android:layout_alignRight="@+id/btnConfirm"
          android:text="Looking for"
          android:textColor="#3D3C3A"
          android:textColorHint="#3D3C3A"
          android:textSize="18sp"
          android:textStyle="bold" /&gt;
  
      &lt;TextView
          android:id="@+id/texperience"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_alignLeft="@+id/radioGroup1"
          android:layout_below="@+id/etxtheadline"
          android:layout_marginTop="39dp"
          android:text="I am a"
          android:textColor="#3D3C3A"
          android:textSize="18sp"
          android:textStyle="bold" /&gt;
  
      &lt;SeekBar
          android:id="@+id/sbseekBarActivityDistance"
          android:layout_width="250dp"
          android:layout_height="wrap_content"
          android:layout_alignRight="@+id/sbseekBarDistance"
          android:layout_below="@+id/tName01"
          android:progress="50" /&gt;
  
      &lt;TextView
          android:id="@+id/tvseekBarActivityDistanceValue"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_alignLeft="@+id/tvseekBarDistanceValue"
          android:layout_below="@+id/sbseekBarActivityDistance"
          android:text="50"
          android:textSize="18sp" /&gt;
  
      &lt;TextView
          android:id="@+id/tName01"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_below="@+id/tvseekBarDistanceValue"
          android:layout_centerHorizontal="true"
          android:layout_marginTop="14dp"
          android:text="Activities search distance"
          android:textSize="18sp"
          android:textStyle="bold"
          android:typeface="sans" /&gt;
  
      &lt;TextView
          android:id="@+id/textView14"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_alignLeft="@+id/tName4"
          android:layout_below="@+id/tvMinAge"
          android:layout_marginTop="16dp"
          android:text="Maximum Age Looking For"
          android:textColor="#3D3C3A"
          android:textSize="18sp"
          android:textStyle="bold"
          android:typeface="sans" /&gt;
  
      &lt;EditText
          android:id="@+id/etxtheadline"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_alignLeft="@+id/sbseekBarMaximumAge"
          android:layout_alignRight="@+id/conditions"
          android:layout_below="@+id/tvMaxAge"
          android:ems="10"
          android:gravity="left"
          android:hint="Quick description about you"
          android:maxLength="50"
          android:singleLine="true"
          android:textAlignment="gravity"
          android:textColor="#000"
          android:textColorHint="#3D3C3A"
          android:textSize="17sp"
          android:typeface="serif" /&gt;
  
      &lt;Button
          android:id="@+id/btnConfirm"
          android:layout_width="120dp"
          android:layout_height="60dp"
          android:layout_alignBaseline="@+id/btnBack"
          android:layout_alignBottom="@+id/btnBack"
          android:layout_alignRight="@+id/tvPaid4"
          android:alpha="0.8"
          android:background="@drawable/blue_bac2"
          android:text="Confirm"
          android:textColor="#ffffff"
          android:textSize="17sp"
          android:textStyle="bold" /&gt;
  
      &lt;TextView
          android:id="@+id/tName4"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_alignLeft="@+id/tName01"
          android:layout_below="@+id/etxtage"
          android:layout_marginTop="18dp"
          android:text="Minimum Age Looking For"
          android:textColor="#3D3C3A"
          android:textSize="18sp"
          android:textStyle="bold"
          android:typeface="sans" /&gt;
  
      &lt;TextView
          android:id="@+id/tvMinAge"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_below="@+id/sbseekBarMinimumAge"
          android:layout_centerHorizontal="true"
          android:text="25"
          android:textColor="#000"
          android:textSize="18sp"
          android:typeface="sans" /&gt;
  
      &lt;TextView
          android:id="@+id/tvMaxAge"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_below="@+id/sbseekBarMaximumAge"
          android:layout_centerHorizontal="true"
          android:text="50"
          android:textColor="#000"
          android:textSize="18sp"
          android:typeface="sans" /&gt;
  
      &lt;TextView
          android:id="@+id/tProfileTitle"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_alignParentLeft="true"
          android:layout_alignParentTop="true"
          android:layout_marginTop="12dp"
          android:padding="10dp"
          android:text="Welcome to Dooba. We provide you with a date for everything you want to do. To begin, please fill out all of the information below."
          android:textSize="20sp"
          android:textStyle="normal|bold"
          android:typeface="sans" /&gt;
  
      &lt;Button
          android:id="@+id/btnPictureSelect"
          android:layout_width="130dp"
          android:layout_height="60dp"
          android:layout_alignRight="@+id/profilePicturePreview"
          android:layout_below="@+id/profilePicturePreview"
          android:alpha="0.8"
          android:background="#3D3C3A"
          android:gravity="center_vertical|center_horizontal|left"
          android:onClick="pickPhoto"
          android:padding="5dp"
          android:text="Upload from device gallery"
          android:textColor="#ffffff"
          android:textSize="18sp"
          android:textStyle="bold"
          android:typeface="sans" /&gt;
  
      &lt;Button
          android:id="@+id/btnBack"
          android:layout_width="120dp"
          android:layout_height="60dp"
          android:layout_below="@+id/tvseekBarActivityDistanceValue"
          android:layout_marginTop="28dp"
          android:layout_toLeftOf="@+id/tvseekBarActivityDistanceValue"
          android:alpha="0.8"
          android:background="#ccc"
          android:text="Back"
          android:textColor="#000"
          android:textSize="17sp"
          android:textStyle="bold" /&gt;
  
      &lt;EditText
          android:id="@+id/etxtage"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_below="@+id/btnPictureSelect"
          android:layout_centerHorizontal="true"
          android:layout_marginTop="29dp"
          android:ems="10"
          android:hint="Enter your age here"
          android:inputType="number"
          android:maxLength="2"
          android:textAlignment="center"
          android:textColor="#000"
          android:textColorHint="#3D3C3A"
          android:textSize="17sp"
          android:typeface="sans" &gt;
  
  
      &lt;/EditText&gt;
  
      &lt;EditText
          android:id="@+id/etxtname"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_alignLeft="@+id/conditions"
          android:layout_alignRight="@+id/sbseekBarMinimumAge"
          android:layout_below="@+id/tvPaid1"
          android:layout_marginTop="17dp"
          android:ems="10"
          android:gravity="center"
          android:hint="Enter your name here"
          android:inputType="textPersonName"
          android:maxLength="30"
          android:textColor="#000"
          android:textColorHint="#3D3C3A"
          android:textSize="18sp"
          android:typeface="sans" /&gt;
  
      &lt;TextView
          android:id="@+id/tvPaid1"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_alignLeft="@+id/conditions"
          android:layout_alignRight="@+id/etxtname"
          android:layout_below="@+id/tProfileTitle"
          android:layout_marginTop="19dp"
          android:gravity="center"
          android:text="Profile Creation"
          android:textColor="#ff0000"
          android:textSize="25sp"
          android:textStyle="bold|normal"
          android:typeface="sans" /&gt;
  
      &lt;ImageView
          android:id="@+id/profilePicturePreview"
          android:layout_width="132dp"
          android:layout_height="120dp"
          android:layout_below="@+id/tvPaid4"
          android:layout_marginTop="14dp"
          android:layout_toRightOf="@+id/texperience"
          android:alpha="1"
          android:background="@drawable/border_image"
          android:cropToPadding="true"
  
          android:padding="3dp"
          android:scaleType="centerCrop" /&gt;
  
      &lt;TextView
          android:id="@+id/tvPaid4"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_alignLeft="@+id/sbseekBarMinimumAge"
          android:layout_alignTop="@+id/tSex"
          android:text="Upload your profile picture"
          android:textSize="20sp"
          android:textStyle="bold"
          android:typeface="sans" /&gt;
  
  &lt;/RelativeLayout&gt;
  
  &lt;/ScrollView&gt;
  </code></pre>