title: EditText Is Not Visible With Open Keyboard
body: <p>I have a fullscreen activity with a fullscreen ImageView in the background. I have an EditText placed in the middle of the screen using <code>gravity:center</code>. When the keyboard opens I want the EditText to move up as shown in the picture below so that the whole EditText is always visible. I have attempted using  <code>android:windowSoftInputMode="stateVisible|adjustResize"</code> however the problem with this is that my Image in the background is also resized which is not desirable. Furthermore, since the gravity is set to center this results in there being a gap between the EditText and keyboard so that it is still in the center. I have tried using a scrollView however I did not know how to obtain the position at which the keyboard ends so that I can move my EditText to that position. I have also tried <code>adjustPan</code> however this had no effect since the EditText is <code>200dp</code> in height and the gravity is set to center so the user always starts typing in the middle of the EditText which is still visible. </p>
  
  <p>XML </p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;FrameLayout
  xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:tools="http://schemas.android.com/tools"
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  tools:context=".MainActivity"&gt;
  
  &lt;FrameLayout
      android:id="@+id/camera_view"
      android:layout_width="match_parent"
      android:layout_height="match_parent"&gt;
  
  &lt;/FrameLayout&gt;
  &lt;ImageView
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:visibility="gone"
      android:id="@+id/picturedisplay"/&gt;
  
      &lt;LinearLayout
          android:layout_width="fill_parent"
          android:layout_gravity="center"
          android:layout_height="200dp"
          android:weightSum="100"
          android:visibility="gone"
          android:id="@+id/pic_layout"
          android:orientation="vertical"
          android:background="#9945D199"
          &gt;
          &lt;EditText
              android:layout_width="fill_parent"
              android:layout_height="0dp"
              android:hint="Enter text here..."
              android:textColor="#FFFFFF"
              android:maxLength="250"
              android:gravity="center"
              android:imeOptions="flagNoExtractUi"
              android:id="@+id/pic_textbox"
              android:layout_weight="90"/&gt;
          &lt;TextView
              android:layout_width="40dp"
              android:layout_height="0px"
              android:text="200"
              android:textColor="#FFFFFF"
              android:textStyle="bold"
              android:gravity="center_horizontal"
              android:layout_weight="10"
              android:id="@+id/char_rem_view"
              android:layout_gravity="end"/&gt;
      &lt;/LinearLayout&gt;
  
  &lt;Button
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:id="@+id/imgClose"
      android:layout_gravity="right|bottom"
      android:text="Flip Cam"
      android:padding="20dp"/&gt;
  &lt;Button
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:id="@+id/snap"
      android:text="Capture"
      android:layout_gravity="center|bottom"
      android:padding="20dp"/&gt;
  &lt;Button
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:text="Flash"
      android:visibility="visible"
      android:id="@+id/imgOpen"
      android:layout_gravity="left|bottom"
      android:padding="20dp"/&gt;
  &lt;Button
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:id="@+id/addText"
      android:layout_gravity="right|bottom"
      android:text="Add Text"
      android:visibility="gone"
      android:padding="20dp"/&gt;
  &lt;Button
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:id="@+id/addPic"
      android:text="Add Pic"
      android:visibility="gone"
      android:layout_gravity="center|bottom"
      android:padding="20dp"/&gt;
  &lt;Button
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:text="Delete"
      android:id="@+id/delete"
      android:visibility="gone"
      android:layout_gravity="left|bottom"
      android:padding="20dp"/&gt;
  &lt;Button
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:text="Save"
      android:id="@+id/save_photo"
      android:visibility="gone"
      android:layout_gravity="right|top"
      android:padding="20dp"/&gt;
  </code></pre>
  
  <p></p>
  
  <p><a href="https://i.stack.imgur.com/dkYzC.png" rel="noreferrer"><img src="https://i.stack.imgur.com/dkYzC.png" alt="enter image description here"></a></p>