Java tutorial
//package com.java2s; //License from project: Open Source License import android.app.Activity; import android.graphics.Point; import android.view.Display; public class Main { public static Point getDisplaySize(Activity activity) { Display display = activity.getWindowManager().getDefaultDisplay(); final Point size = new Point(); display.getSize(size); return size; } }