横屏靠右,切换横竖靠右 有问题
Opened this issue · 1 comments
AnnisLeejj commented
每次放开都会计算x位置,使用到了Util.class,取消Point的'单例',每次重新测量:
static int getScreenWidth(Context context) { Point sPoint = new Point(); WindowManager wm = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE); wm.getDefaultDisplay().getSize(sPoint); return sPoint.x; }
static int getScreenHeight(Context context) { Point sPoint = new Point(); WindowManager wm = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE); wm.getDefaultDisplay().getSize(sPoint); return sPoint.y; }
YangKangLi commented
这个问题解决了吗