I\'ve got a layout with some views, from which one is an EditText. The layout easily fits on one page, BUT, when the soft keyboard is out, the layout doesn\'t scroll. Here\'
In my case any of the solution above does not work until I REMOVE
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
in my activity, I use that code to get a full screen display. Maybe for certain cases, try to remove any setup of full screen to make any of the above solution works.
Add android:windowSoftInputMode="stateHidden|adjustResize"
to your tag in AndroidManifest.xml file. This will cause the screen to be resized to the left over space after the soft keyboard is shown. So, you will be able to scroll easily.
I had the same problem and I checked my activity in the manifest, and the reason why it wasn't working is because I didn't use this property:
android:windowSoftInputMode="adjustResize"
Now it works great and no need to do additional anchors.
In my case, what solved this was setting a missing constraint in the Bottom. My ScrollView had top, right, and left constraints, but no bottom one. After restricting it from all sides, it started to overlap the above textview, which prompted me to try putting the height to 0dp, and that seemed to solve the problem.
<activity
android:windowSoftInputMode="adjustResize"
>
try this In android manifest ..
My problem was with a HorizontalScrollView. In my case I had to set HorizontalScrollView to:
android:layout_width="match_parent"
android:layout_height="match_parent"
And remove:
android:layout_above="@+id/closeButton"
android:layout_below="@+id/logo"
In the AndroidManifest.xml the activity is set to:
android:windowSoftInputMode=""
I hope this helps anyone comming across this weird bug.