Android Pie edittext does not adjustPan/resize while typing

大憨熊 提交于 2019-12-19 21:49:22

问题


On Android PIE I have an Activity with several Edittext views inside a linear layout, and using SOFT_INPUT_ADJUST_PAN. While I am typing with soft keyboard on an Edittext the text is not displayed.

If I type text on an Edittext near the top of the screen, where no PAN is necessary to keep the Edittext visible when the soft keyboard is displayed, everything works normally.

If I type text on an Edittext near the bottom of the screen, where PAN is made to keep the Edittext visible when the soft keyboard is displayed, while I am typing, the typed text does not show on the Edittext, but as soon as I press Next or Done to hide the keyboard the text that I typed appears.

I have no special code on the activity, even If I remove any reference in the code to the EditTexts the problem remains. This only happens on Android Pie devices.

Tried compiling with SDK27 targeting SDK27 and compiling with SDK28 targeting SDK28, and is the same.

UPDATE:

I found what is making it not work. I have android:hardwareAccelerated="false" in the manifest at application level. If I set it to true, then it works.

Is there a way to make it work without hardware acceleration?

来源:https://stackoverflow.com/questions/54196952/android-pie-edittext-does-not-adjustpan-resize-while-typing

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!