valentincognito
6/22/2018 - 2:15 AM

Get screen / display size

Get the screen dimension at runtime

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