I'm new to Android development, and have been able to set the text of EditText
elements through XML code, but how can I do it in code?
Simply call the setText()
method. Here is an example:
EditText e = (EditText) findViewById(R.id.editText);
e.setText("New Text");
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With