Java tutorial
//package com.java2s; //License from project: Open Source License import android.app.Activity; import android.content.Context; import android.view.WindowManager; public class Main { public static int getScreenHeight(Activity context) { WindowManager wm = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE); int height = wm.getDefaultDisplay().getHeight(); return height; } }