java - Append text to a TextView datatype -


i'm beginner android/java programmer , background in c++ , c#. in c# if have string variable called myword , has value of "hello" can append additional information using + operator.

i tried method few times in java , apparently can't use tatic because textview datatype void. android studio gives me following error: operator '+' cannot applied 'void', 'java.lang.string'

/*c # */ public string bob () { return "bob!"; }  string myword = "hello "; myword = myword + "bob!"; //myword equal "hello bob!"  or   myword = "hello " + bob(); //myword equal "hello bob!"   */ java */ textview displaytextview = null; displaytextview.settext("hello"); 

i'd find way append additional text original value of "hello" value of displaytextview "hello bob!"

any ideas?

edit: i'm using capital "s" , app can access , retrieve information class. app fc whenver tried append text to textview data type.

thank feedback everyone.

you can call append() on textview object.

in case be: displaytextview.append("bob!");


Comments

Popular posts from this blog

css - SVG using textPath a symbol not rendering in Firefox -

Java 8 + Maven Javadoc plugin: Error fetching URL -

node.js - How to abort query on demand using Neo4j drivers -