We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
每次放开都会计算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 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; }
The text was updated successfully, but these errors were encountered:
这个问题解决了吗
Sorry, something went wrong.
No branches or pull requests
每次放开都会计算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; }
The text was updated successfully, but these errors were encountered: