How to add text to editext

前端 未结 5 1102
旧巷少年郎
旧巷少年郎 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条回答
  •  Happy的楠姐
    2021-01-05 13:24

    Should be as simple as:

    editText.setText("hello");
    

    In your code:

    EditText editText=(EditText)findViewById(R.id.x);
    editText.setText("hello");
    

提交回复
热议问题