Android ScrollView doesn't scroll when the keyboard is up

The link that Flipbed provided is the answer to your solution. You don't need to implement your workaround if you simply add "adjustResize" to your activity in the manifest. The problem you were having before is that you were using adjustPan. Where adjustPan does not resize the window, it pans the view so that whatever has focus is never obscured by the soft keyboard. If you check out Google's documentation (see link below) it will make sense.

Example:

<activity android:name="YourActivity" 
          android:windowSoftInputMode="adjustResize" />

http://developer.android.com/guide/topics/manifest/activity-element.html#wsoft