protected static DisplayMetrics getDisplayMetrics ( Context ctx ) { try { return ctx . getResources ( ) . getDisplayMetrics ( ) ; } catch ( Exception e ) { Log . e ( TAG , "Error getting DisplayMetrics." , e ) ; return null ; } }
Get the DisplayMetrics object for the current application .