WindowManager winManager=(WindowManager)getSystemService(Context.WINDOW_SERVICE);
setTitle(winManager.getDefaultDisplay().getWidth()+"*"+winManager.getDefaultDisplay().getHeight());
android获取当前窗口的宽度和高度
最新推荐文章于 2023-01-28 22:34:02 发布
WindowManager winManager=(WindowManager)getSystemService(Context.WINDOW_SERVICE);
setTitle(winManager.getDefaultDisplay().getWidth()+"*"+winManager.getDefaultDisplay().getHeight());