package com.itant.shiwushu.tool;

import android.app.Activity;
import android.util.DisplayMetrics;

/**
 * Created by Jason on 2018/10/14.
 */

public class UITool {
    public static int getScreenWidth(Activity activity) {
        DisplayMetrics dm = activity.getResources().getDisplayMetrics();
        return dm.widthPixels;
    }

    public static int getScreenHeight(Activity activity) {
        DisplayMetrics dm = activity.getResources().getDisplayMetrics();
        return dm.heightPixels;
    }
}
