Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

横屏靠右,切换横竖靠右 有问题 #129

Open
AnnisLeejj opened this issue Jul 3, 2020 · 1 comment
Open

横屏靠右,切换横竖靠右 有问题 #129

AnnisLeejj opened this issue Jul 3, 2020 · 1 comment

Comments

@AnnisLeejj
Copy link

每次放开都会计算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
Copy link

这个问题解决了吗

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants