Check out example codes for "how to resize layout when element hide android". It will help you in understanding the concepts better.

Code Example 1

use
	View.GONE
instead of
	View.INVISIBLE

Learn ReactJs, React Native from akashmittal.com