textview - Is it possible to getText() and setTextColor() at the same time in android? -


i want ask, there textview api can use gettext() , settextcolor() @ same time? mean, if in code, should below:

textview.gettext().equals("hehe").settextcolor(r.color.red);

i appreciate answer or suggestion here. lot!

no not possible. function equals returns boolean not textview.

you should try:

if (textview.gettext().equals("hehe")) {   textview.settextcolor(r.color.red); } 

Comments

Popular posts from this blog

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project.Error occurred in starting fork -

windows - Debug iNetMgr.exe unhandle exception System.Management.Automation.CmdletInvocationException -

configurationsection - activeMq-5.13.3 setup configurations for wildfly 10.0.0 -