How to add text to editext

前端 未结 5 1070
旧巷少年郎
旧巷少年郎 2021-01-05 13:03

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

5条回答
  •  天涯浪人
    2021-01-05 13:42

    You'd need editText.setText(editText.getText() + "string");.

    EditText et = (EditText) findViewById(R.id.editText1);
    et.setText(et.getText() + title);
    

提交回复
热议问题