@@ -0,0 +1,574 @@
+package com.pepoc.joke;%0A%0Aimport android.app.Activity;%0Aimport android.util.DisplayMetrics;%0A%0A/**%0A * Created by yangchen on 15-12-9.%0A */%0Apublic class DeviceInfo %7B%0A%0A    private static int%5B%5D screen = null;%0A%0A    public static int%5B%5D getScreenSize(Activity context) %7B%0A        if (screen == null) %7B%0A            DisplayMetrics dm = new DisplayMetrics();%0A            context.getWindowManager().getDefaultDisplay().getMetrics(dm);%0A            screen = new int%5B2%5D;%0A            screen%5B0%5D = dm.widthPixels;%0A            screen%5B1%5D = dm.heightPixels;%0A        %7D%0A        return screen;%0A    %7D%0A%7D%0A

add DeviceInfo.java