![](/img/trans.png)
[英]MeasureSpecs passed to onMeasure indicate the full parent size instead of the remaining available space
我觀察到一個問題,我的自定義視圖的onMeasure方法正在接收一個對應於完整父視圖大小的MeasureSpec ,而不是剩余的可用空間。 當視圖的layout_width/height屬性等於wrap_content時會發生這種情況。 這個問題使我無法正確計算實際自定義視圖的大小。 最好通過顯示一 ...