Reputation: 57
I am currently busy learning how to use Firebase and I've built a very simple UI for my experiment. Unfortunately, when I test the app and I want to fill in the EditTexts with the keyboard, the keyboard is appearing over the UI elements. I can't figure out why this is happening. I've tried out ConstraintLayout and RelativeLayout, but the problem is on both layouts.
Before filling in EditText
During filling in EditText
Thanks in advance!
Upvotes: 0
Views: 51
Reputation: 472
add
android:windowSoftInputMode="stateVisible|adjustResize"
to your activity in the manifest file.
Upvotes: 0
Reputation: 2699
add this line of cdoe which will scroll the layout to above the soft keyboard.
getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_VISIBLE|WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE);
or, write your layout inside a scrollview
Upvotes: 1