Code example for Display

Methods: getHeight, getWidth

0
 */ 
public class ExtDisplay { 
    public static Point getDisplaySize(Display display){
        int sdk = Build.VERSION.SDK_INT;
        if (sdk < 13) {
            return new Point(display.getWidth(),display.getHeight() );
        } else { 
            Point screenSize = new Point();
            display.getSize(screenSize);
            return screenSize;
        } 
    }  
}