Check out example codes for "how to get witdth of window android". It will help you in understanding the concepts better.

Code Example 1

// Java
DisplayMetrics displayMetrics = new DisplayMetrics();
getWindowManager().getDefaultDisplay().getMetrics(displayMetrics);
int height = displayMetrics.heightPixels;
int width = displayMetrics.widthPixels;

Learn ReactJs, React Native from akashmittal.com