0

I have two activity forms in Android Studio. I am trying to get it so the form will scroll and when the virtual keyboard pops up it won't cover the contents. For example:

Login

As you can see the keyboard overlaps two buttons underneith the two text boxes. How can I make it so it doesn't do this?

I have tried using android:windowSoftInputMode="adjustResize" in the manifest file but it seems to still cover the buttons.

Cheers.

ProjectDelta
  • 351
  • 4
  • 12
Zack Antony Bucci
  • 571
  • 1
  • 12
  • 29

2 Answers2

1

You might want to play with the windowSoftInputMode.

<activity android:windowSoftInputMode="stateVisible|adjustResize" . . . >

See developer docs here for more info.

Angelo Parente
  • 796
  • 2
  • 6
  • 15
0

I've found that if android:windowSoftInputMode="adjustResize" in the manifest doesn't work then you probably don't have android:fitsSystemWindows="true" in the root view on your layout.xml(in my case I had the issue with ConstraintLayout but I know it also works for relativeLayout, I'm not sure about the other Layouts)

ProjectDelta
  • 351
  • 4
  • 12