title: Why doesn't android:windowSoftInputMode="stateVisible|adjustResize" adjust the screen when soft keyboard is shown?
body: <p>I can't seem to make the android:windowSoftInputMode="stateVisible|adjustResize" option work.
  When the soft keyboard shows, the scroll view doesn't automatically scroll to the bottom part.</p>
  
  <p><strong>Edit</strong>: I tried using adjustPan instead (stateVisible|adjustPan) but what happens is the scroll view gets disabled.</p>
  
  <p><strong>Solution</strong>: Finally, I found a suggestion that works. I created an OnGlobalLayoutListener() and added it to my scroll view. I checked if the height of the root view of my activity(which is my scroll view) changed. If yes, I'm assuming that the soft keyboard is shown.</p>
  
  <p>Click <a href="https://stackoverflow.com/a/4737265/2546729">here</a> for more info.</p>
  
  <p>Here's my source code:</p>
  
  <p><strong>AndroidManifest.xml</strong></p>
  
  <pre><code>&lt;application
          ...
          android:theme="@android:style/Theme.NoTitleBar" &gt;
          &lt;activity
              ...
              android:screenOrientation="portrait"
              android:windowSoftInputMode="stateVisible|adjustResize" &gt;
              &lt;intent-filter&gt;
                  &lt;action android:name="android.intent.action.MAIN" /&gt;
  
                  &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
              &lt;/intent-filter&gt;
          &lt;/activity&gt;
          ...
  &lt;/application&gt;
  </code></pre>
  
  <p>Login Screen with keyboard - scroll view does not scroll
  <img src="https://i.stack.imgur.com/VmMwf.png" alt="enter image description here"></p>
  
  <p>Desired result
  <img src="https://i.stack.imgur.com/3y83n.jpg" alt="enter image description here"></p>