Skip to content Skip to sidebar Skip to footer

New Value Edittext Not Being Displayed , No Errors Whatsoever

EDIT : By the way , if i hard code edt4.setText('any text') IN THE SCOPE , it shows the value EDIT2: tried rebuilding/cleaning project , could this be a bug in settext method, it

Solution 1:

try removing recreate();

you are recreating the activity after setting the value, so the previous value is lost

Solution 2:

I think result.getText() is a String anyway, so you could change the following line:

edt4.setText(String.valueOf(result.getText()));

To:

edt4.setText(result.getText());

After that you call updateScannerData, which is also writing to the EditText once again, but from the UI-Thread. I would recommend to remove the UI-Thread code as well since I assume the code runs on that Thread anyway.

Solution 3:

You can either use

edt4.clear();

or

edt4.setText("");

Post a Comment for "New Value Edittext Not Being Displayed , No Errors Whatsoever"