打赏

android 动态添加布局计算高度 动态计算控件高度

//    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();

 

posted @ 2020-08-05 08:52  张学涛  阅读(780)  评论(0)    收藏  举报