public static int getScreenHeight ( Context context ) { DisplayMetrics metrics = context . getResources ( ) . getDisplayMetrics ( ) ; return metrics . heightPixels ; }
Returns the screen height in pixels