title: Fix a layout above soft keyboard
body: <p>I know this question has been on the internet for ages, but nothing seems to work in my case.</p>
  
  <p><strong>What's wrong</strong></p>
  
  <p><a href="https://i.stack.imgur.com/8KVI9.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/8KVI9.jpg" alt="enter image description here"></a> <a href="https://i.stack.imgur.com/e8zUn.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/e8zUn.jpg" alt="enter image description here"></a></p>
  
  <p>As seen in screenshots, the layout having the spinner is not pushed up and is overlapped by the soft keyboard. I want this layout to be placed just above the keyboard when it pops up.</p>
  
  <p><strong>My layout file</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:app="http://schemas.android.com/apk/res-auto"
      xmlns:tools="http://schemas.android.com/tools"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:background="@android:color/white"
      android:orientation="vertical"
      tools:context="believe.cht.speak.MainActivity"&gt;
  
      &lt;ImageView
          android:id="@+id/logo"
          android:layout_width="64dp"
          android:layout_height="64dp"
          android:layout_gravity="center_horizontal"
          android:layout_margin="16dp"
          android:src="@drawable/ic_bubble"
          android:tint="@color/blue" /&gt;
  
      &lt;EditText
          android:layout_width="match_parent"
          android:layout_height="0dp"
          android:layout_weight="1"
          android:background="@android:color/transparent"
          android:gravity="top|start"
          android:hint="Start typing..."
          android:padding="8dp" /&gt;
  
      &lt;ImageView
          android:id="@+id/shadow"
          android:layout_width="match_parent"
          android:layout_height="6dp"
          android:src="@drawable/shadow" /&gt;
  
      &lt;RelativeLayout
          android:id="@+id/spinnerLayout"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_gravity="bottom"
          android:background="@color/blue"&gt;
  
          &lt;Spinner
  
              android:id="@+id/spinner"
              android:layout_width="200dp"
              android:layout_height="48dp"
              android:layout_alignParentEnd="true" /&gt;
  
      &lt;/RelativeLayout&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p><strong>What I've tried</strong></p>
  
  <pre><code>android:windowSoftInputMode="adjustResize"
  
  android:windowSoftInputMode="adjustPan" //in the manifest, also tried combining the two
  
  getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN); //in the activity
  
  &lt;item name="android:windowActionBarOverlay"&gt;true&lt;/item&gt; //in styles.xml
  </code></pre>