Programming Tips - How can I make a view disappear and not take up any space?

Date: 2017mar19 OS: Android Language: Java Q. How can I make a view disappear and not take up any space? A.
mMyView.setVisibility(View.GONE);