getChildMeasureSpec的源碼分析中呈枉,case MeasureSpec.UNSPECIFIED臼朗,
else if (childDimension == LayoutParams.MATCH_PARENT) {
// Child wants to be our size... find out how big it should
// be
resultSize = View.sUseZeroUnspecifiedMeasureSpec ? 0 : size;
resultMode = MeasureSpec.UNSPECIFIED;
}
這句話你的理解貌似有問(wèn)題筒饰,resultSize = View.sUseZeroUnspecifiedMeasureSpec ? 0 : size;這個(gè)resultsize應(yīng)該等于size彤委,不是0吧
Android View的繪制流程View的繪制和事件處理是兩個(gè)重要的主題剂习,上一篇《圖解 Android事件分發(fā)機(jī)制》已經(jīng)把事件的分發(fā)機(jī)制講得比較詳細(xì)了揪垄,這一篇是針對(duì)View的繪制皇拣,View的繪制如果你有所了...