How to hide and show button programmatically in android?
Replied on August 13, 2015
Button, EditText, TextView, ListView etc are the classes in android and there is a method
setVisibility()
In which we can pass
View.GONE View.VISIBLE View.INVISIBLE
as required. See the samples.
1. button.setVisibility(View.GONE) will hide the button and space acquired by button 2. button.setVisibility(View.INVISIBLE) will hide button only. 3. button.setVisibility(View.VISIBLE) will make button visible.
We are a group of software developers. We enjoy learning and sharing technologies. To improve the site's content, your valuable suggestions are most welcome. Thanks
Email : concretepage@gmail.com