Reputation: 1706
I want to hide a relative layout completely. i have a view with several Layouts i use as buttons with an onClickListener. Now i want to display only those Buttons that i want because sometimes an Object doesnt have all Data. I tried to set visiblity to "4" wich should be "gone" but that didnt do the trick. there still is space reserved for this Layout. What can i do about this?
Thank you.
Upvotes: 1
Views: 6414
Reputation: 1281
to hide:
RelativeLayout.setVisibility(View.INVISIBLE);
to show it again:
RelativeLayout.setVisibility(View.VISIBLE);
Upvotes: 1