public static class FrameLayout.LayoutParams extends ViewGroup.MarginLayoutParams
FrameLayout Layout Attributes
for a list of all child view attributes that this class supports.Modifier and Type | Field and Description |
---|---|
int |
gravity
The gravity to apply with the View to which these layout parameters
are associated.
|
static int |
UNSPECIFIED_GRAVITY
Value for
gravity indicating that a gravity has not been
explicitly specified. |
bottomMargin, DEFAULT_MARGIN_RELATIVE, leftMargin, rightMargin, topMargin
FILL_PARENT, height, layoutAnimationParameters, MATCH_PARENT, width, WRAP_CONTENT
Constructor and Description |
---|
LayoutParams(Context c,
AttributeSet attrs) |
LayoutParams(FrameLayout.LayoutParams source)
Copy constructor.
|
LayoutParams(int width,
int height) |
LayoutParams(int width,
int height,
int gravity)
Creates a new set of layout parameters with the specified width, height
and weight.
|
LayoutParams(ViewGroup.LayoutParams source) |
LayoutParams(ViewGroup.MarginLayoutParams source) |
copyMarginsFrom, encodeProperties, getLayoutDirection, getMarginEnd, getMarginStart, isLayoutRtl, isMarginRelative, onDebugDraw, resolveLayoutDirection, setLayoutDirection, setMarginEnd, setMargins, setMarginsRelative, setMarginStart
debug, setBaseAttributes, sizeToString
public static final int UNSPECIFIED_GRAVITY
gravity
indicating that a gravity has not been
explicitly specified.public int gravity
The default value is UNSPECIFIED_GRAVITY
, which is treated
by FrameLayout as Gravity.TOP | Gravity.START
.
Gravity
public LayoutParams(Context c, AttributeSet attrs)
public LayoutParams(int width, int height)
public LayoutParams(int width, int height, int gravity)
width
- the width, either ViewGroup.LayoutParams.MATCH_PARENT
,
ViewGroup.LayoutParams.WRAP_CONTENT
or a fixed size in pixelsheight
- the height, either ViewGroup.LayoutParams.MATCH_PARENT
,
ViewGroup.LayoutParams.WRAP_CONTENT
or a fixed size in pixelsgravity
- the gravityGravity
public LayoutParams(ViewGroup.LayoutParams source)
public LayoutParams(ViewGroup.MarginLayoutParams source)
public LayoutParams(FrameLayout.LayoutParams source)
source
- The layout params to copy from.