I'm doing campo.setText()
, by pressing a button this value is displayed in the interface when it is updated.
The problem is that by doing campo.getText()
, you get the previous value that was entered using the keyboard, not the value that was entered with the .setText()
.
In order for this value to be updated, I have to click on the text field, once I do it, the current value can be obtained.
How do I get the new value with getText()
?