我是Android开发的新手,已经能够通过XML代码设置EditText
元素的文本,但是如何在代码中进行设置呢?
Simply call the setText()
method. Here is an example:
EditText e = (EditText) findViewById(R.id.editText);
e.setText("New Text");
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.