Check out example codes for "linear layout element to center". It will help you in understanding the concepts better.
Code Example 1
android:gravity takes care of its children, android:layout_gravity takes care of itself
Code Example 2
Learn ReactJs, React Native from akashmittal.com