title: Soft keyboard covers editText in ScrollView-layout
body: <p>I'm working on an Android fragment with this layout:  </p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      xmlns:tools="http://schemas.android.com/tools"
      android:background="@color/very_dark_transparent_grey"
      tools:ignore="MissingPrefix"&gt;
  
  &lt;RelativeLayout
      android:layout_width="match_parent"
      android:layout_height="wrap_content"&gt;
  
      &lt;LinearLayout
          android:id="@+id/invite_code_input_layout"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_marginTop="@dimen/spacing_semi_huge"
          android:gravity="center_horizontal"
          android:orientation="vertical"&gt;
  
          &lt;TextView
              fontPath="fonts/helveticaneue/Helvetica Neu Bold.ttf"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:text="@string/join_fragment_invite_code"
              android:textColor="@color/white"
              android:textSize="@dimen/font_larger" /&gt;
  
          &lt;LinearLayout
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:orientation="horizontal"
              android:paddingLeft="@dimen/spacing_huge"
              android:paddingRight="@dimen/spacing_huge"&gt;
  
              &lt;io.brandie.brandie.custom.InviteCodeEditText
                  android:id="@+id/invite_code_edit_text"
                  fontPath="fonts/helveticaneue/Helvetica Neu Bold.ttf"
                  android:layout_width="match_parent"
                  android:layout_height="wrap_content"
                  android:layout_marginTop="@dimen/spacing_smaller"
                  android:cursorVisible="false"
                  android:digits="1234567890"
                  android:inputType="number"
                  android:maxLength="6"
                  android:textIsSelectable="false"
                  android:textSize="32sp" /&gt;
  
          &lt;/LinearLayout&gt;
  
          &lt;TextView
              fontPath="fonts/helveticaneue/Helvetica Neu Bold.ttf"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_marginTop="@dimen/spacing_large"
              android:layout_marginBottom="@dimen/spacing_large"
              android:text="@string/join_fragment_or"
              android:textColor="@color/lightGreen"
              android:textSize="@dimen/font_large"/&gt;
  
      &lt;/LinearLayout&gt;
  
      &lt;RelativeLayout
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_below="@+id/invite_code_input_layout"&gt;
  
          &lt;RelativeLayout
              android:id="@+id/message_layout"
              android:layout_width="match_parent"
              android:layout_height="match_parent"&gt;
  
              &lt;TextView
                  android:id="@+id/request_to_join_text"
                  fontPath="fonts/helveticaneue/Helvetica Neu Bold.ttf"
                  android:layout_width="match_parent"
                  android:layout_height="wrap_content"
                  android:layout_marginBottom="@dimen/spacing_big"
                  android:gravity="center"
                  android:text="@string/join_fragment_pers_mess"
                  android:textColor="@color/white" /&gt;
  
              &lt;EditText
                  android:id="@+id/request_to_join_text_area"
                  android:layout_width="280dp"
                  android:layout_height="120dp"
                  android:layout_below="@+id/request_to_join_text"
                  android:background="@drawable/rounded_edit_text"
                  android:gravity="top|start"
                  android:hint="@string/join_fragment_hint"
                  android:inputType="textMultiLine"
                  android:lines="6"
                  android:layout_centerInParent="true"
                  android:overScrollMode="always"
                  android:paddingLeft="@dimen/spacing_normal"
                  android:paddingRight="@dimen/spacing_normal"
                  android:scrollHorizontally="false"
                  android:scrollbars="vertical"
                  android:textSize="@dimen/font_normal" /&gt;
  
              &lt;TextView
                  android:id="@+id/request_to_join_send_button"
                  fontPath="fonts/helveticaneue/Helvetica Neu Bold.ttf"
                  android:layout_width="match_parent"
                  android:layout_height="wrap_content"
                  android:layout_below="@+id/request_to_join_text_area"
                  android:layout_marginTop="@dimen/spacing_semi_small"
                  android:gravity="center"
                  android:text="@string/join_fragment_send"
                  android:textColor="@drawable/primary_text_color"
                  android:textSize="@dimen/font_semi_epic" /&gt;
  
          &lt;/RelativeLayout&gt;
  
          &lt;RelativeLayout
              android:id="@+id/pending_layout"
              android:layout_width="match_parent"
              android:layout_height="match_parent"
              android:layout_marginTop="10dp"
              android:visibility="gone"&gt;
  
              &lt;RelativeLayout
                  android:id="@+id/checkbox"
                  android:layout_width="match_parent"
                  android:layout_height="wrap_content"&gt;
  
                  &lt;ProgressBar
                      android:id="@+id/circle_around_check"
                      style="?android:attr/progressBarStyleHorizontal"
                      android:layout_width="150dp"
                      android:layout_height="150dp"
                      android:layout_alignParentTop="true"
                      android:layout_centerHorizontal="true"
                      android:max="100"
                      android:progress="100"
                      android:progressDrawable="@drawable/circular_lightgreen_border"
                      android:rotation="0"
                      android:visibility="visible" /&gt;
  
                  &lt;ImageView
                      android:id="@+id/progress_card_check_mark"
                      android:layout_width="60dp"
                      android:layout_height="60dp"
                      android:layout_centerHorizontal="true"
                      android:layout_centerVertical="true"
                      android:src="@drawable/douglas_273_checkmark_white"
                      android:visibility="visible" /&gt;
              &lt;/RelativeLayout&gt;
  
              &lt;TextView
                  android:id="@+id/request_pending_text"
                  fontPath="fonts/helveticaneue/Helvetica Neu Bold.ttf"
                  android:layout_width="match_parent"
                  android:layout_height="wrap_content"
                  android:layout_below="@+id/checkbox"
                  android:gravity="center"
                  android:text="@string/join_fragment_req_pend"
                  android:textColor="@color/white"
                  android:textSize="@dimen/font_semi_epic" /&gt;
  
              &lt;TextView
                  android:id="@+id/request_pending_edit"
                  android:layout_width="match_parent"
                  android:layout_height="wrap_content"
                  android:layout_below="@+id/request_pending_text"
                  android:layout_marginTop="10dp"
                  android:gravity="center"
                  android:text="@string/join_fragment_edit"
                  android:textColor="@drawable/primary_text_color"
                  android:textSize="@dimen/font_large" /&gt;
  
             &lt;/RelativeLayout&gt;
  
         &lt;/RelativeLayout&gt;
  
     &lt;/RelativeLayout&gt;
  
    &lt;/ScrollView&gt;
  </code></pre>
  
  <p>The problem is with the Edittext, when I press it the soft-keyboard covers almost the whole EditText, making it impossible to see what you type. In the manifest I've added the line: </p>
  
  <pre><code>android:windowSoftInputMode="adjustPan"
  </code></pre>
  
  <p>for the activity the fragment is attached to (I've also tested "adjustResize", but I had the same issue).</p>
  
  <p>I've also tested copying the editText to another layout-file in the same activity and then the keyboard doesn't cover the editText but pushes the entire layout up. If I instead copy this entire layout and put it in another layout I get the same issue with keyboard covering the editText.</p>
  
  <p>This makes me believe something with this layout is the cause of this issue, but I can't figure out what causes it and how I fix it. How do I fix this?</p>