Added onMeasure behaviour and restricted view to square base