背景
当FrameLayout里面是match_parent的时候,如果FrameLayout是wrap_content,则里面的view也会被当作wrap_content处理
原因
FrameLayout内的measureChildWithMargins -> getChildMeasureSpec的子类的MeasureSpec确定规则由父类的MeasureSpec和子类的LayoutParams决定
当FrameLayout里面是match_parent的时候,如果FrameLayout是wrap_content,则里面的view也会被当作wrap_content处理
FrameLayout内的measureChildWithMargins -> getChildMeasureSpec的子类的MeasureSpec确定规则由父类的MeasureSpec和子类的LayoutParams决定