I have a custom view that could show a view in same space that should be soft keyboard native for android.
I need to having the keyboard opened, click in a button, hide the keyboard and shows other view in same place that keyboard be/was.
I have that implemented right now just with a hide keyboard and show custom view but has a weird behavior and min lag and overlapping.
Has someone implemented a similar stuff?
So what happens in your code is that:
Tell system to close the keyboard -> Show red panel with a small delay -> Red panel is shown before keyboard closing -> Since keyboard mode is in adjustResize
the red panel shown above keyboard -> Keyboard get closed -> Everything in place
Try to change windowSoftInputMode
in manifest from adjustResize
to adjustNothing
.
Sadly keyboard in android doesn't work smoothly like in IOS, keyboard is handled by OS means you no control over it size, opening/closing animation and no callback! So the best way is to always show red panel and when needed Open keyboard on top of it.
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