Android获得屏幕的宽和高
程序员文章站
2022-03-08 11:37:45
...
int screenWidth;
int screenHeight;
WindowManager windowManager = getWindowManager();
Display display = windowManager.getDefaultDisplay();
screenWidth = display.getWidth();
screenHeight = display.getHeight();
下一篇: LeetCode9. 回文数