Java tutorial
//package com.java2s; //License from project: Apache License import android.graphics.Point; import android.view.Display; import java.lang.reflect.Method; public class Main { public static Point getRealSize(Display display) { Point outPoint = new Point(); Method mGetRawH; try { mGetRawH = Display.class.getMethod("getRawHeight"); Method mGetRawW = Display.class.getMethod("getRawWidth"); outPoint.x = (Integer) mGetRawW.invoke(display); outPoint.y = (Integer) mGetRawH.invoke(display); return outPoint; } catch (Throwable e) { return null; } } }