Java tutorial
//package com.java2s; import android.content.Context; public class Main { public static String getDisplaySize(Context context) { int screenWidth = context.getResources().getDisplayMetrics().widthPixels; int screenHeight = context.getResources().getDisplayMetrics().heightPixels; return screenHeight + "*" + screenWidth; } }