int w = View.MeasureSpec.makeMeasureSpec(0, View.MeasureSpec.UNSPECIFIED); int h = View.MeasureSpec.makeMeasureSpec(0, View.MeasureSpec.UNSPECIFIED); holder.ivPicture.measure(w, h);int height = holder.ivPicture.getMeasuredHeight();int width = holder.ivPicture.getMeasuredWidth();
获取控件的宽高
最新推荐文章于 2021-05-25 22:54:39 发布