Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Keyboard issue while focusing on bottom edit text in Android

I am working on an android Application where I am willing to get input from user. I created a layout for it which has a scroll view as a root view & Relative layout as it's child all the other layout are inside this Relative layout. But when edit text is at the bottom of screen & user click on it to bring keyboard it shows some blank box between edit text & keyboard & after this if user enters any word it doesn't get displayed in edit text. But if Edit text is above nearly more then half size of screen it works fine. You can get more clearly by looking at images below

Here is my code

enter image description here

enter image description here

enter image description here

Does anyone faced this kind of problem?? Please help!!!

like image 975
Sandip Jadhav Avatar asked Apr 10 '12 07:04

Sandip Jadhav


People also ask

How do I stop EditText from moving up when keyboard appears?

Try removing the bottom constraint on your EditText, and setting the top constraint on your button to the bottom of the EditText instead of the top of the parent.

How do I enable soft keyboard on Android?

To enable your latest Android keyboard, scroll to the bottom and hit the System entry. Then, click Languages & input. Pick Virtual keyboard on the following page. You will find a list of all the existing keyboards on your smartphone here.


1 Answers

The default IME mode set on the activity in the manifest (android:windowSoftInputMode="adjustPan") will pan the main layout so the text field is in the middle of the viewable area. While the majority of your content is in a scrollable region, it is simply moving the whole region and not scrolling the contents into view. If you use android:windowSoftInputMode="adjustNothing" it will prevent the layout panning, but will also effectively do nothing and just cover your original input.

MY recommendation would be to use adjustResize, this might fix it for you. If not, you have to look into doing some custom scroll-region focusing.

like image 151
Colin Godsey Avatar answered Jan 03 '23 19:01

Colin Godsey