转自:http://blog.csdn.net/ypq374563453/article/details/22819947
获取屏幕宽高4.0中直接使用getwidth()和getheight()已经过时使用point替代用法是
//屏幕宽高
Display display = getWindowManager().getDefaultDisplay(); Point size = newPoint(); display.getSize(size); width = size.x; height = size.y;
时间: 2024-10-17 13:38:16