Can you change a b4xFloatTextField input/keyboard type at runtime.
I'd like to use the same view for both numeric and text, but set the keyboard upon display.
Thanks,
Rusty
Can you change a b4xFloatTextField input/keyboard type at runtime.
I'd like to use the same view for both numeric and text, but set the keyboard upon display.
This is only half-an-answer, because I am in the middle of a project and haven't been game to update my B4A to the B4XLIB level, but... it used to work, and I would expect that the XUI library would be similarly capable.
(with the proviso that: when you say "set the keyboard upon display", presumably you mean display of the field, not display of the keyboard... changing the keyboard after it is displayed sounds like a much more ambitious affair ;-)
B4X:
Dim InputField As EditText
InputField.Text = VariableContainingExistingFieldData
If IsNumber(InputField.Text) Then
InputField.InputType = InputField.INPUT_TYPE_DECIMAL_NUMBERS
Else
InputField.InputType = InputField.INPUT_TYPE_TEXT
End If