简体   繁体   English

为什么UI在键盘解雇时会闪烁...?

[英]Why UI is flickering on keyboard dismissal…?

I have created a runtime views as shown in Attachment, when user clicks on any Edittext then keyboard appears, after typing something I am making some operations in aftertextchanged callback. 我创建了一个运行时视图,如附件中所示,当用户点击任何Edittext然后键盘出现时,在键入内容后我在aftertextchanged回调中进行了一些操作。 When I dismiss the Keyboard, there is a shifting of layout downwards as shown in attachment.I don't understand why the system is not able to render the UI immediately once the keyboard dismissal.Is that anything related to the AfterTextChanged() implementation. 当我关闭键盘时,布局向下移动,如附件中所示。我不明白为什么系统无法在键盘解雇后立即呈现UI。这是与AfterTextChanged()实现相关的任何事情。 Even tried by running the code in separate thread whatever i am executing in aftertextchanged but no use. 甚至尝试通过在单独的线程中运行代码,无论我在aftertextchanged执行,但没有用。 Please help me if anybody is having any idea. 如果有人有任何想法,请帮助我。 在此输入图像描述

check the windowSoftInputMode 检查windowSoftInputMode

this might help you decide wich mode meets your needs 这可能有助于您确定哪种模式满足您的需求

try this one in your activity tag in the manifest 在清单中的活动标签中尝试这个

<activty windowSoftInputMode ="adjustUnspecified"/>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM