I\'ve got a problem with populating an edittext. Using the following code i can set the text just fine, however what i am trying to do is add to the edittext. For example th
String title = bundle.getString("number1");
EditText editText = (EditText) findViewById(R.id.editText1);
editText.setText(editText.getText().toString() + title);
Should be as simple as:
editText.setText("hello");
In your code:
EditText editText=(EditText)findViewById(R.id.x);
editText.setText("hello");
try this code
String title = bundle.getString("number1");
EditText editText = (EditText) findViewById(R.id.editText1);
editText.append(title);
if you want to set the only new value use this
editText.setText(title);
You'd need editText.setText(editText.getText() + "string");
.
EditText et = (EditText) findViewById(R.id.editText1);
et.setText(et.getText() + title);
Set edit text to the previuos value plus the new value.
EditText et = (EditText) findViewById(R.id.editText1);
et.setText(et.GetText() + title);