Code example for Display

Methods: getHeightgetWidth

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;
        } 
    }  
} 
Stop searching for code, let great code find you!  Add Codota to your java IDE