通过什么方式才能简单的得到当前Screen的尺寸和Orientation方向模式呢?
应用Android.view.display和WindowManager两个方法来完成题目中所提到的目的,以下是具体的代码:
/* First, get the Display from the WindowManager */ Display display = ((WindowManager) getSystemService(WINDOW_SERVICE)).getDefaultDisplay(); /* Now we can retrieve all display-related infos */ int width = display.getWidth(); int height = display.getHeight(); int orientation = display.getOrientation();



