Android examples for android.app:Screen
get Screen size in Pixel
import android.app.Activity; import android.util.DisplayMetrics; public class Main{ public static int[] getScreenPix(Activity act) { DisplayMetrics dm = new DisplayMetrics(); act.getWindowManager().getDefaultDisplay().getMetrics(dm); int[] pixs = { dm.widthPixels, dm.heightPixels }; return pixs; }//ww w . ja va2 s .c o m }