public static int[] getScreenDispaly(Context context) {
  WindowManager windowManager = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE);
  int width = windowManager.getDefaultDisplay().getWidth();// 手机屏幕的宽度
  int height = windowManager.getDefaultDisplay().getHeight();// 手机屏幕的高度
  int result[] = { width, height };
  return result;
}

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-01
  • 2021-09-16
  • 2022-12-23
  • 2021-12-19
  • 2022-12-23
猜你喜欢
  • 2021-06-11
  • 2021-12-19
  • 2021-09-09
  • 2022-01-08
  • 2021-04-01
  • 2022-12-23
相关资源
相似解决方案