title: Keyboard hiding EditTexts in Fragments
body: <p><strong>edit: 
  I need to use the keyboard, but it hides my <code>EditText</code>, I need it to scroll so the keyboard is not hiding it.</strong> </p>
  
  <p>I am using a Samsung tablet.</p>
  
  <p>My style:</p>
  
  <pre><code>parent="android:Theme.Holo.NoActionBar.Fullscreen"
  </code></pre>
  
  <p>The <code>EditText</code> fields are in a scrollable view, like so:  </p>
  
  <p>The fragment layout:</p>
  
  <pre><code>&lt;FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
           android:layout_height="match_parent"
           android:layout_width="match_parent"
           android:paddingBottom="@dimen/activity_vertical_margin"
           android:paddingLeft="@dimen/activity_horizontal_margin"
           android:paddingRight="@dimen/activity_horizontal_margin"
           android:paddingTop="@dimen/activity_vertical_margin"&gt;
  
  &lt;ScrollView
      android:layout_height="wrap_content"
      android:layout_width="match_parent"&gt;
  
      &lt;LinearLayout
          android:layout_height="match_parent"
          android:layout_marginBottom="20dp"
          android:layout_width="match_parent"
          android:orientation="vertical"&gt;
  
          &lt;TextView
              android:layout_height="wrap_content"
              android:layout_marginTop="20dp"
              android:layout_width="wrap_content"
              android:text="@string/depot_code"/&gt;
  
          &lt;EditText
              android:hint="@string/enter_depot_code"
              android:id="@+id/etlocationId"
              android:imeOptions="actionNext"
              android:inputType="number"
              android:layout_height="wrap_content"
              android:layout_marginTop="20dp"
              android:layout_width="wrap_content"
              android:lines="1"
              android:maxLength="12"
              android:singleLine="true"&gt;
  
              &lt;requestFocus/&gt;
          &lt;/EditText&gt;
  
          &lt;TextView
              android:layout_height="wrap_content"
              android:layout_marginTop="20dp"
              android:layout_width="wrap_content"
              android:text="@string/name"/&gt;
  
          &lt;EditText
              android:hint="@string/enter_name"
              android:id="@+id/etname"
              android:imeOptions="actionNext"
              android:inputType="textPersonName"
              android:layout_height="wrap_content"
              android:layout_marginTop="20dp"
              android:layout_width="wrap_content"
              android:lines="1"
              android:maxLength="24"
              android:singleLine="true"/&gt;
  
          &lt;TextView
              android:layout_height="wrap_content"
              android:layout_marginTop="20dp"
              android:layout_width="wrap_content"
              android:text="@string/street"/&gt;
  
          &lt;EditText
              android:hint="@string/enter_street"
              android:id="@+id/etstreet"
              android:imeOptions="actionNext"
              android:inputType="textPostalAddress"
              android:layout_height="wrap_content"
              android:layout_marginTop="20dp"
              android:layout_width="wrap_content"
              android:lines="1"
              android:maxLength="24"
              android:singleLine="true"/&gt;
  
          &lt;TextView
              android:layout_height="wrap_content"
              android:layout_marginTop="20dp"
              android:layout_width="wrap_content"
              android:text="@string/suburb"/&gt;
  
          &lt;EditText
              android:hint="@string/enter_suburb"
              android:id="@+id/etsuburb"
              android:layout_height="wrap_content"
              android:layout_marginTop="20dp"
              android:layout_width="wrap_content"
              android:lines="1"
              android:maxLength="24"
              android:singleLine="true"/&gt;
  
          &lt;TextView
              android:layout_height="wrap_content"
              android:layout_marginTop="20dp"
              android:layout_width="wrap_content"
              android:text="@string/state"/&gt;
  
          &lt;Spinner
              android:focusable="true"
              android:focusableInTouchMode="true"
              android:id="@+id/spinner"
              android:imeOptions="actionNext"
              android:layout_height="wrap_content"
              android:layout_marginTop="20dp"
              android:layout_width="fill_parent"
              android:spinnerMode="dropdown"/&gt;
  
          &lt;TextView
              android:layout_height="wrap_content"
              android:layout_marginTop="20dp"
              android:layout_width="wrap_content"
              android:text="@string/phone"/&gt;
  
          &lt;EditText
              android:hint="@string/enter_phone"
              android:id="@+id/etphone"
              android:imeOptions="actionDone"
              android:inputType="phone"
              android:layout_height="wrap_content"
              android:layout_marginTop="20dp"
              android:layout_width="wrap_content"
              android:lines="1"
              android:maxLength="12"
              android:singleLine="true"/&gt;
  
          &lt;Button
              android:id="@+id/btnadd"
              android:layout_gravity="center"
              android:layout_height="wrap_content"
              android:layout_marginTop="20dp"
              android:layout_width="wrap_content"
              android:text="@string/add"/&gt;
      &lt;/LinearLayout&gt;
  &lt;/ScrollView&gt;
  &lt;/FrameLayout&gt;
  </code></pre>
  
  <p>The Activity layout:</p>
  
  <pre><code>&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
            android:id="@+id/tech_controller"
            android:layout_height="match_parent"
            android:layout_width="match_parent"
            android:orientation="vertical"
            android:paddingBottom="@dimen/activity_vertical_margin"
            android:paddingLeft="@dimen/activity_horizontal_margin"
            android:paddingRight="@dimen/activity_horizontal_margin"
            android:paddingTop="@dimen/activity_vertical_margin"&gt;
  
  &lt; .../ Layouts. ../&gt;
  
  &lt;FrameLayout
      android:id="@+id/second"
      android:layout_height="match_parent"
      android:layout_width="fill_parent"/&gt;
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>Similar questions have been asked, but I have not found an answer that works.</p>
  
  <p>I have a project that uses many fragments attached to the one activity.
  In my manifest for the activity I have:</p>
  
  <pre><code>android:windowSoftInputMode="stateHidden"
  </code></pre>
  
  <p>Some of the fragments require user input.</p>
  
  <p>In the fragment layout I use:</p>
  
  <p>Each fragment is nested as follows:</p>
  
  <pre><code>&lt;FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_height="match_parent"
      android:layout_width="match_parent" .../&gt;
  
  &lt;ScrollView
      android:layout_height="match_parent"
      android:layout_width="match_parent"&gt;
  
      &lt;LinearLayout
          android:layout_height="match_parent"
          android:layout_width="match_parent"
          android:orientation="vertical"&gt;
  
          &lt;EditText
              android:imeOptions="actionNext"
              or
              android:imeOptions="actionDone" .../&gt;
  </code></pre>
  
  <p>This works well. EXCEPT
  the keyboard hides the EditTexts that are positioned lower on the page.</p>
  
  <p><img src="https://i.stack.imgur.com/bGRYD.jpg" alt="enter image description here"></p>
  
  <p>I have read this over and over:</p>
  
  <p><a href="http://developer.android.com/reference/android/widget/TextView.html#attr_android:imeOptions" rel="noreferrer">http://developer.android.com/reference/android/widget/TextView.html#attr_android:imeOptions</a></p>
  
  <p>Tried these suggestions, but the keyboard is then visible when the activity is called, which I don't want. It also does not work. Maybe because it is a fragment?</p>
  
  <p><a href="https://stackoverflow.com/questions/4432903/softkeyboard-hiding-edittext">SoftKeyboard hiding EditText</a></p>
  
  <p><a href="https://stackoverflow.com/questions/24262414/android-keyboard-hides-edittext">Android Keyboard hides EditText</a></p>
  
  <p>I have been trying to work out a dynamic solution. Any help is appreciated.</p>
  
  <p><strong>edit: This is for use on tablets and there is only one keyboard option, with language changes.</strong></p>
  
  <hr>
  
  <p><strong>Edit: MY SOLUTION</strong></p>
  
  <p>I have solved it by installing another soft keyboard. <a href="https://code.google.com/p/softkeyboard/wiki/HowTo" rel="noreferrer">https://code.google.com/p/softkeyboard/wiki/HowTo</a></p>