Code example for Display

Methods: getHeightgetOrientationgetWidth

0
     * Calculate Dimensions 
     *  
     *********************************/ 
    private void calcViewWidths(Display display){
		 
		if(display.getOrientation() == 0){
			viewWidth = (int) Math.floor(
				display.getWidth() * 
				NAVIGATOR_SCREEN_FRACTION
				); 
		 
			viewWidthNormal = (int) Math.floor(
				display.getWidth() * 
				(1-NAVIGATOR_SCREEN_FRACTION)
				); 
			viewWidthBig = (int) Math.min(
				display.getWidth(),
				display.getHeight()
				); 
		}else{     
			viewWidth = (int) Math.floor(
				display.getWidth() * 
				NAVIGATOR_SCREEN_FRACTION_LANDSCAPE
				); 
			viewWidthNormal = (int) Math.floor(
				display.getWidth() * 
				(1-NAVIGATOR_SCREEN_FRACTION_LANDSCAPE) / 2
				); 
			viewWidthBig = (int) Math.min(
				display.getWidth(),
				display.getHeight()
				); 
		} 
		viewWidthBig = display.getWidth() - 30;
		viewHeightBig = display.getHeight() - 60;
		 
		viewWidthBig = 320;
		viewHeightBig = 320;
 
    } 
Connect your IDE to all the code out there  Get Codota for Java