Reworked onMeasure to allow true wrap_content