/**
* 获取屏幕高度(px)
*/
private static int getScreenHeight(Context context) {
return context.getResources().getDisplayMetrics().heightPixels;
}
/**
* 获取屏幕宽度(px)
*/
private static int getScreenWidth(Context context) {
return context.getResources().getDisplayMetrics().widthPixels;
}
Android获取屏幕高度和宽度
最新推荐文章于 2023-03-02 11:38:50 发布