DisplayMetrics dm = new DisplayMetrics();getWindowManager().getDefaultDisplay().getMetrics(dm);String width = dm.widthPixels;String height = dm.heightPixels;
DisplayMetrics dm = new DisplayMetrics();getWindowManager().getDefaultDisplay().getMetrics(dm);String width = dm.widthPixels;String height = dm.heightPixels;