|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectandroid.view.View.MeasureSpec
public static class 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:
| Field Summary | |
|---|---|
static int |
AT_MOST
Measure specification mode: The child can be as large as it wants up to the specified size. |
static int |
EXACTLY
Measure specification mode: The parent has determined an exact size for the child. |
static int |
UNSPECIFIED
Measure specification mode: The parent has not imposed any constraint on the child. |
| Constructor Summary | |
|---|---|
View.MeasureSpec()
|
|
| Method Summary | |
|---|---|
static int |
getMode(int measureSpec)
Extracts the mode from the supplied measure specification. |
static int |
getSize(int measureSpec)
Extracts the size from the supplied measure specification. |
static int |
makeMeasureSpec(int size,
int mode)
Creates a measure specification based on the supplied size and mode. |
static String |
toString(int measureSpec)
Returns a String representation of the specified measure specification. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int UNSPECIFIED
public static final int EXACTLY
public static final int AT_MOST
| Constructor Detail |
|---|
public View.MeasureSpec()
| Method Detail |
|---|
public static int makeMeasureSpec(int size,
int mode)
size - the size of the measure specificationmode - the mode of the measure specification
public static int getMode(int measureSpec)
measureSpec - the measure specification to extract the mode from
UNSPECIFIED,
AT_MOST or
EXACTLYpublic static int getSize(int measureSpec)
measureSpec - the measure specification to extract the size from
public static String toString(int measureSpec)
measureSpec - the measure specification to convert to a String
|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||