Code example for Display

Methods: getRotation

0
	} 
 
	@TargetApi(8) 
	private String getDisplayRotation(Display display){
		if(android.os.Build.VERSION.SDK_INT >= 8){
			return String.valueOf(display.getRotation());
		} else { 
			return "Unavailable"; 
		} 
	} 
 
	private void populateUI() { 
		GuiCreation gc = new GuiCreation(this);
		DisplayMetrics metrics = new DisplayMetrics();
		getWindowManager().getDefaultDisplay().getMetrics(metrics);
		Display display = ((WindowManager)getSystemService(Context.WINDOW_SERVICE)).getDefaultDisplay();
 
		// General Information 
		mTableInfo.addView(gc.createTitleRow("Device Information"));
		mTableInfo.addView(gc.createRow("Manufacturer:", String.valueOf(android.os.Build.MANUFACTURER), ""));
		mTableInfo.addView(gc.createRow("Model:", String.valueOf(android.os.Build.MODEL), ""));