WindowManager wm = (WindowManager) getContext().getSystemService(Context.WINDOW_SERVICE); DisplayMetrics dm = new DisplayMetrics(); wm.getDefaultDisplay().getMetrics(dm); pm_width = dm.widthPixels; pm_height = dm.heightPixels;
原文地址:https://www.cnblogs.com/hahayixiao/p/10086948.html
时间: 2024-11-13 16:19:46