Taken from the Android documentation about LayoutParams:
FILL_PARENT, which means the view wants to be as big as its parent (minus padding)
WRAP_CONTENT, which means that the view wants to be just big enough to enclose its content (plus padding)
Now, if the parent sets its height to wrap_content
, and the child sets its height to fill_parent
, what does that actually mean? I mean, this sounds like a "tie" between size requests: the child wants to be as big as its parent, but the parent wants to be as big as its child.
I've read How Android Draws Views, but the article doesn't explain how layout params and MeasureSpecs actually work together.