If you're using Telegram, you may have seen, if you keep last visible item on X, when keyboard opens, you still see item X and if you close the keyboard, the item X is still on its position.
example:
when keyboard is closed already:
Item 1
Item 2
when keyboard is opened:
item 1
item 2
keyboard
when you close the keyboard, the first step is what you will see.
I want to implement something like that. How can I do this?