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
Post a Comment