I have an activity with a bunch of EditText fields on it, and the windowSoftInputMode is set to adjustPan, this mostly does what I want, however for the editText at the bottom of the layout, it doesn't pan enough. It'll pan to show the top line of a multiline edit text, but as soon as you hit enter, the cursor moves down a line and is now hidden under the keyboard.
Is there anyway I can make it pan further so that the top of the editText is all the way at the top of the window.
Using adjustResize definitely won't do what I want, pan is the right thing, just need it to pan further.
Posted on October 25, 2010 by Lars Vogel. Android has the so-called Input Method Framework to support different input methods, e.g. keyboard, soft-keyboard, handwriting etc. If the soft-keyboard is used it is diplayed at the bottom of the screen once the user select an text view to edit it.
Same thing was happen with me.
What I did to resolve is, I just put all the controls in ScrolllView.
And set android:windowSoftInputMode adjustResize. So whenever keyboard is open it will scroll the screen to adjust the view and Edittext always show on screen.
Hope this idea works for you.
Thanks
Put your EditText inside the ScrollView and then give property adjustResize, instead of adjustPan, it will automatically adjust your screen and its components.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With