TextView textView = findViewById(R.id.myTextView); textView.append("Hello World!"); // appends "Hello World!" to the text already present in the TextView
String newString = "Goodbye!"; textView.append("\n" + newString); // appends a newline and the string "Goodbye!" to the TextViewThis example creates a new string "Goodbye!" and appends it to the TextView on a new line. Package library: Android SDK platform.