val view = LayoutInflater.from(context).inflate(R.layout.item,null)
// 使用 measure 方法测量视图的高度
val widthMeasureSpec = View.MeasureSpec.makeMeasureSpec(0, View.MeasureSpec.UNSPECIFIED)
val heightMeasureSpec = View.MeasureSpec.makeMeasureSpec(0, View.MeasureSpec.UNSPECIFIED)
view.measure(widthMeasureSpec, heightMeasureSpec)
val measuredHeight = view.measuredHeight