[英]How to get the absolute height and width of the available display size in pixels
I am looking for absolute height and width of the available display in pixels like we do in android我正在寻找可用显示的绝对高度和宽度(以像素为单位),就像我们在 android 中所做的那样
activity.getResources().getDisplayMetrics().heightPixels;
or或者
activity.getResources().getDisplayMetrics().widthPixels;
You can still use this interface on Huawei phones.您仍然可以在华为手机上使用该接口。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.