@IntDef({UNSPECIFIED, EXACTLY, AT_MOST})
@Retention(RetentionPolicy.SOURCE)
public @interface MeasureSpecMode {}
/**
-
Measure specification mode: The parent has not imposed any constraint
-
on the child. It can be whatever size it wants.
*/
public static final int UNSPECIFIED = 0 << MODE_SHIFT;
/**
-
Measure specification mode: 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.
*/
public static final int EXACTLY = 1 << MODE_SHIFT;
/**
-
Measure specification mode: The child can be as large as it wants up
-
to the specified size.
*/
public static final int AT_MOST = 2 << MODE_SHIFT;
/**
-
Creates a measure specification based on the supplied size and mode.
-
The mode must always be one of the following:
-
- {@link android.view.View.MeasureSpec#UNSPECIFIED}
- {@link android.view.View.MeasureSpec#EXACTLY}
- {@link android.view.View.MeasureSpec#AT_MOST}
-
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.
-
{@link android.widget.RelativeLayou