老式茶几

View通用

1、计算view尺寸

ViewTreeObserver vto = view.getViewTreeObserver();
vto.addOnPreDrawListener(new ViewTreeObserver.OnPreDrawListener() {
        public boolean onPreDraw() {
                int height = view.getMeasuredHeight();
                int width = view.getMeasuredWidth();
                return true;
            }
}); 

 

posted on 2014-11-28 17:11  老式茶几  阅读(94)  评论(0编辑  收藏  举报

导航