That's a difficult solution. And not guaranteed to work on all devices because of more complex calculations required. The better way can be just create a semitransparent layer above with text field showing on the top of screen, whenever it's clicked and keyboard shows up.