- // int w = View.MeasureSpec.makeMeasureSpec(0, View.MeasureSpec.UNSPECIFIED);
- // int h = View.MeasureSpec.makeMeasureSpec(0, View.MeasureSpec.UNSPECIFIED);
- // inflate.measure(w, h);
- // int width = inflate.getMeasuredWidth();
- // int height = inflate.getMeasuredHeight();
来源: http://www.bubuko.com/infodetail-3653621.html