I'm creating a registration screen for my game. I implemented textfields and input is getting correctly. But when I click elsewhere after text is entered, the keyboard stays visible and does not hide automatically, even when a new screen is loaded. Is there any listener methods for hiding the keyboard?
Right now I did a workaround by calling the
setOnscreenKeyboardVisible(false) in the sign up and sign in buttons. But I want the keyboard to hide right when it is unfocussed. Is it possible?
Actually I thought when I click elsewhere the textfield focus changed automatically but that's not the case. The cursor keeps blinking even after the keyboard is hidden explicitly. I edited the correct answer to include this.