<pre name="code" class="java"> WindowManager wm = this.getWindowManager(); Point screenAttribute = new Point(); wm.getDefaultDisplay().getSize(screenAttribute); Toast.makeText(this, "Screen Width:" + screenAttribute.x +",Screen Height"+ screenAttribute.y, Toast.LENGTH_SHORT).show();
时间: 2024-10-10 00:52:54