DisplayMetrics dm = new DisplayMetrics(); getWindowManager().getDefaultDisplay().getMetrics(dm); // Toast.makeText(this, "屏幕分辨率为:" + dm.widthPixels + " * " + dm.heightPixels, Toast.LENGTH_LONG).show();