Append text and ad text to TextView Android example

String s = "Some text for appending\n";
 TextView   mTitle = (TextView) findViewById(;
 mTitle.setText(R.string.app_name); // insert text from strings.xml
 mTitle.append(s); // append string like a variable value
 mTitle.append("My string will appended\n"); // append string

You can insert this source code into onCreate in your activity file

This entry was posted in Android Examples Code and tagged , , , . Bookmark the permalink.

Comments are closed.