In my Java Android application, in run time according to a condition I need to setvisible false in a TextView. How to do it run time programmatically?
You're looking for the setVisibility
method in View
.
textView.setVisibility(View.GONE);
textView.setVisibility(View.INVISIBLE);
It doesn't take a boolean because you can set it to either Invisible or Gone. If it's Gone, it will not take up any "space" in the layout.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With