[英]How can I get the height and width values of View's text size in pixels?
[英]How to get the absolute height and width of the available display size in pixels
我正在尋找可用顯示的絕對高度和寬度(以像素為單位),就像我們在 android 中所做的那樣
activity.getResources().getDisplayMetrics().heightPixels;
或者
activity.getResources().getDisplayMetrics().widthPixels;
您仍然可以在華為手機上使用該接口。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.