public static class TableLayout.LayoutParams extends LinearLayout.LayoutParams
This set of layout parameters enforces the width of each child to be
ViewGroup.LayoutParams.MATCH_PARENT
and the height of each child to be
ViewGroup.LayoutParams.WRAP_CONTENT
, but only if the height is not specified.
gravity, weight
bottomMargin, DEFAULT_MARGIN_RELATIVE, leftMargin, rightMargin, topMargin
FILL_PARENT, height, layoutAnimationParameters, MATCH_PARENT, width, WRAP_CONTENT
Constructor and Description |
---|
LayoutParams()
Sets the child width to
ViewGroup.LayoutParams and the child height to
ViewGroup.LayoutParams.WRAP_CONTENT . |
LayoutParams(Context c,
AttributeSet attrs) |
LayoutParams(int w,
int h) |
LayoutParams(int w,
int h,
float initWeight) |
LayoutParams(ViewGroup.LayoutParams p) |
LayoutParams(ViewGroup.MarginLayoutParams source) |
Modifier and Type | Method and Description |
---|---|
protected void |
setBaseAttributes(TypedArray a,
int widthAttr,
int heightAttr)
Fixes the row's width to
ViewGroup.LayoutParams.MATCH_PARENT ; the row's
height is fixed to
ViewGroup.LayoutParams.WRAP_CONTENT if no layout
height is specified. |
debug, encodeProperties
copyMarginsFrom, getLayoutDirection, getMarginEnd, getMarginStart, isLayoutRtl, isMarginRelative, onDebugDraw, resolveLayoutDirection, setLayoutDirection, setMarginEnd, setMargins, setMarginsRelative, setMarginStart
sizeToString
public LayoutParams(Context c, AttributeSet attrs)
public LayoutParams(int w, int h)
public LayoutParams(int w, int h, float initWeight)
public LayoutParams()
Sets the child width to
ViewGroup.LayoutParams
and the child height to
ViewGroup.LayoutParams.WRAP_CONTENT
.
public LayoutParams(ViewGroup.LayoutParams p)
public LayoutParams(ViewGroup.MarginLayoutParams source)
protected void setBaseAttributes(TypedArray a, int widthAttr, int heightAttr)
Fixes the row's width to
ViewGroup.LayoutParams.MATCH_PARENT
; the row's
height is fixed to
ViewGroup.LayoutParams.WRAP_CONTENT
if no layout
height is specified.
setBaseAttributes
in class ViewGroup.LayoutParams
a
- the styled attributes setwidthAttr
- the width attribute to fetchheightAttr
- the height attribute to fetch