问题
The soft keyboard moves a TextView object up with it, (adjusting), and this causes the TextView to overlay another TextView that I'd like to be able to see.
I need a way to lock this TextView specifically, so that the keyboard will overlay it. But only that component. I do not want to pan the entire window, just this one, single, TextView object.
Is there a way to tell the TextView, "Dammit bro, don't move with the keyboard" programmatically?
To be honest, I'd also be willing to settle for keeping all of the components from moving, allowing the keyboard to overlay all of them.
Thanks in advance.
回答1:
So, to answer this, the basic answer is that there is no way to do this.
You can try android:windowSoftInputMode
and use "adjustNothing,
" but apparently this doesn't work (and it didn't work for me either.)
Other than that, you're limited to adjustPan
and adjustResize
for the soft input repositioning, so you'll have to make your UI accommodate this huge issue.
来源:https://stackoverflow.com/questions/21898018/android-lock-components-in-place-with-soft-keyboard