View.MeasureSpec

A MeasureSpec encapsulates the layout requirements passed from parent to child.
Each MeasureSpec represents a requirement for either the width or the height.
A MeasureSpec is comprised of a size and a mode. There are three possible
modes:

UNSPECIFIED

The parent has not imposed any constraint on the child. It can be whatever size
it wants.

EXACTLY

The parent has determined an exact size for the child. The child is going to be
given those bounds regardless of how big it wants to be.

AT_MOST

The child can be as large as it wants up to the specified size.

MeasureSpecs are implemented as ints to reduce object allocation. This class
is provided to pack and unpack the <size, mode> tuple into the int.

Causes the current thread to wait until another thread invokes the
notify() method or the
notifyAll() method for this object, or
some other thread interrupts the current thread, or a certain
amount of real time has elapsed.

makeMeasureSpec

Note: On API level 17 and lower, makeMeasureSpec's
implementation was such that the order of arguments did not matter
and overflow in either value could impact the resulting MeasureSpec.
RelativeLayout was affected by this bug.
Apps targeting API levels greater than 17 will get the fixed, more strict
behavior.