Spacepublic final class Space extends android.view.View Space is a lightweight View subclass that may be used to create gaps between components
in general purpose layouts. |
Methods Summary |
---|
public void | draw(android.graphics.Canvas canvas)Draw nothing.
| private static int | getDefaultSize2(int size, int measureSpec)Compare to: {@link View#getDefaultSize(int, int)}
If mode is AT_MOST, return the child size instead of the parent size
(unless it is too big).
int result = size;
int specMode = MeasureSpec.getMode(measureSpec);
int specSize = MeasureSpec.getSize(measureSpec);
switch (specMode) {
case MeasureSpec.UNSPECIFIED:
result = size;
break;
case MeasureSpec.AT_MOST:
result = Math.min(size, specSize);
break;
case MeasureSpec.EXACTLY:
result = specSize;
break;
}
return result;
| protected void | onMeasure(int widthMeasureSpec, int heightMeasureSpec)
setMeasuredDimension(
getDefaultSize2(getSuggestedMinimumWidth(), widthMeasureSpec),
getDefaultSize2(getSuggestedMinimumHeight(), heightMeasureSpec));
|
|