CommonUtils.java 文件源码

java
阅读 46 收藏 0 点赞 0 评论 0

项目:martian-cli 作者:
public static int getDisplayWidth(Activity activity){
    int width=0;
    if (activity != null && activity.getWindowManager() != null && activity.getWindowManager().getDefaultDisplay() != null) {
        Point point=new Point();
        activity.getWindowManager().getDefaultDisplay().getSize(point);
        width = point.x;
    }
    return width;
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号