Copied code for onMeasure() in FrameLayout to handle child view with defined with and height