Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to set the text in the text view to invisible?

Tags:

android

I can't change its color or use alpha because the background may change and I won't know its color! Is there any other way to set it to invisible ? Also I don't want to set the text view invisible since I want the background to be visible!

like image 884
Nikhil Avatar asked Dec 13 '25 01:12

Nikhil


2 Answers

Try:

textView.setTextColor(getResources().getColor(android.R.color.transparent));
like image 93
Vyacheslav Shylkin Avatar answered Dec 14 '25 14:12

Vyacheslav Shylkin


You can set a textview to INVISIBLE:

myTextView.setVisibility(View.INVISIBLE);

That way the textview will still be present but not seen

like image 22
AndroidNoob Avatar answered Dec 14 '25 15:12

AndroidNoob



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!