Java tutorial
//package com.java2s; import android.graphics.Point; import android.view.WindowManager; public class Main { private static WindowManager windowManager; /** * Gets device height. * * @return the device height */ public static int getDeviceHeight() { Point p = new Point(); windowManager.getDefaultDisplay().getSize(p); return p.y; } }