以获取RecycleView的宽度举例:
/**
* 获取列表的最大自适应宽度
*
* @return int
*/
public int getWarpContentWidth() {
int spec = View.MeasureSpec.makeMeasureSpec(0, View.MeasureSpec.UNSPECIFIED);
mSpinnerList.measure(spec, spec);
return mSpinnerList.getMeasuredWidth();
}