We have a bigger Android 2.1 project, and for some reason, only at two places calling setText() on an EditText or a TextView object just doesn’t work. It does not crashes, does not throw an exception, only the TextView/EditText is not updating.
Here’s the code for setting the text:
EditText etzip_a = (EditText)activity.findViewById(R.id.editTextZip_a);
etzip.setText(m_addressA.zip);
etzip.addTextChangedListener(new onInputChanged(120));
- this code runs on the GUI thread
- it parses the
R.id.editTextZip_aobject successfully from the layout - a totally similar code for other tens of
EditTextare working fine
Does anybody encountered a problem like this?
try using this code:
You have create a object
etzip_aof the EditText. Now after that you are using different objectetzip.