Java tutorial
//package com.java2s; import android.content.Context; import android.graphics.Point; import android.view.Display; import android.view.WindowManager; public class Main { public static Point getScreenSize(Context paramContext) { Display localDisplay = ((WindowManager) paramContext.getSystemService("window")).getDefaultDisplay(); Point localPoint = new Point(); localDisplay.getSize(localPoint); return localPoint; } }