Android Virtual Keyboard freezes

J

J_Dev

Guest
When using the virtual keyboard, it freezes if you try to alter a string of characters. However, if the string is empty (like calling keyboard_string = "" at the start of a room) is completely fine.

For example, in my game I want to limit the characters the user can input for a name to Letters, Numbers and Spaces. So I monitor the string and if the user tries to input any invalid characters (i.e "@") and then set the string back to the last valid entry, like so:

Code:
keyboard_string = valid_name;
The keyboard then freeze on the screen, and extends beyond un-focusing the app, for about 30 seconds. I tried to think of a workaround, and did by instead storing keyboard_string to a separate variable, but then it becomes tedious having to code things like if the player presses Backspace to remove characters.

I also made a dummy piece of code to check that it wasn't an error on my end:
Code:
if (string_width(keyboard_string) > 10){
keyboard_string = "";
}
Resulting in the same error.

Is anybody else experiencing these problems?
 
Top