Further work to onMeasure

to support the interior views being wrap_content.