Search code examples
androidkeyboardlag

Show and Hide keyboard leads to lag when keyboard resize the windows


I will try to explain this issue the best I can, don't hesitate to ask more details if you think it can help. I can't put the whole file because it is a complicated app and a professional one.

Lets go !

I got one Activity that contains a google map view and host a FrameLayout where I can push multiple fragments.

Fragment A contains 3 EditText and one button.

My activity keyboard mode is SOFT_INPUT_ADJUST_RESIZE, so when keyboard showed up inside Fragment A the window is resized. Until here there's is no problem.

But when keyboard show up in a Fragment A with 4 - 5 other fragments (added and not replaced) in backstack the resized process takes more then 1 sec and it looks really bad. And when I hide it, the same thing again 1 sec lag then window resized.

I did try multiple solutions, but they are all workarounds, and I want to understand why resizing is not working properly.

Also, the application doesn't have big leaks in my knowledge.

Help! Please.


Solution

  • So there is the answer, as @VladMatvienko sayed, Activity is resize by keyboard and so all fragments inside. If they are too heavy it can leads to crash.