how can i hide a linear layout in a screen

view story

http://stackoverflow.com – A screen is having two linear layouts in one LinearLayout contains 2 text boxes in the 2nd one button is there, if we click on the button 1st linear layout should be invisible. for hiding a view viewname.setvisiblity(view.gone) but i would like to hoe to hide a linearlayout. (HowTos)