获取当前屏幕高宽:
private Context mContext; private int screenWidth; private int screenHigh; //屏幕管理器 WindowManager wm = (WindowManager) mContext.getSystemService(Context.WINDOW_SERVICE); Point p = new Point(); wm.getDefaultDisplay().getSize(p); screenHigh= p.y; screenWidth = p.x;