Home  >  Forum  >  Android
Post New Query

Android hide show button programmatically

joined on
August 12,2015
Asked on August 13,2015
How to hide and show button programmatically in android? 
joined on
November 09,2013
Replied on August 13,2015

Button, EditText, TextView, ListView etc are the classes in android and there is a method


In which we can pass


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.

Write Answer

Copyright ©2017 concretepage.com, all rights reserved |Privacy Policy | Contact Us