In my application, I have 2 LinearLayout\'s right above each other. Via a menu option, I want to be able to make the bottom one disappear, and have the top one
You can call view.setVisibility(View.GONE) if you want to remove it from the layout.
Or view.setVisibility(View.INVISIBLE) if you just want to hide it.
From Android Docs:
INVISIBLE
This view is invisible, but it still takes up space for layout purposes. Use with
setVisibility(int)andandroid:visibility.GONE
This view is invisible, and it doesn't take any space for layout purposes. Use with
setVisibility(int)andandroid:visibility.