Not sure if anyone else is using the Android EditText component with UE4 but I’m running into a problem with different input types.
Basically I want to pop up a number keyboard, or an email keyboard etc. To do this you specify the InputType on the EditText component - the following is GameActivity Java (specified in an XML file).
switch(_type)
{
case 0: //plain text (general text) (WORKING)
ProgrammaticallyEditText.setInputType(InputType.TYPE_CLASS_TEXT);
break;
case 1: //Simple text (usernames, db entries) (WORKING)
ProgrammaticallyEditText.setInputType(InputType.TYPE_CLASS_TEXT);
break;
case 2: //Email addess
ProgrammaticallyEditText.setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS);
break;
case 3: //Password
ProgrammaticallyEditText.setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_PASSWORD);
break;
case 4: //Number
ProgrammaticallyEditText.setInputType(InputType.TYPE_CLASS_NUMBER | InputType.TYPE_NUMBER_FLAG_SIGNED | InputType.TYPE_NUMBER_FLAG_DECIMAL);
break;
default:
ProgrammaticallyEditText.setInputType(InputType.TYPE_CLASS_TEXT);
break;
}
The problem I’m having is that with some keyboard types input seems to be intercepted by HandleInputCB. For instance when I create a number keyboard all numbers and delete key presses are being captured in HandleInputCB and not entering my text (as in the Java created EditText component is not getting the inputs).
Very confused at this. In my test AndroidStudio project everything works as expected.