Package icyllis.modernui.widget
Class LinearLayout.LayoutParams
java.lang.Object
icyllis.modernui.view.ViewGroup.LayoutParams
icyllis.modernui.view.ViewGroup.MarginLayoutParams
icyllis.modernui.widget.LinearLayout.LayoutParams
- Direct Known Subclasses:
TableLayout.LayoutParams
,TableRow.LayoutParams
- Enclosing class:
LinearLayout
Per-child layout information associated with ViewLinearLayout.
-
Field Summary
Modifier and TypeFieldDescriptionint
Gravity for the view associated with these LayoutParams.float
Indicates how much of the extra space in the LinearLayout will be allocated to the view associated with these LayoutParams.Fields inherited from class icyllis.modernui.view.ViewGroup.MarginLayoutParams
bottomMargin, DEFAULT_MARGIN_RELATIVE, leftMargin, rightMargin, topMargin
Fields inherited from class icyllis.modernui.view.ViewGroup.LayoutParams
height, MATCH_PARENT, width, WRAP_CONTENT
-
Constructor Summary
ConstructorDescriptionLayoutParams
(int width, int height) Creates a new set of layout parameters with the specified width and height.LayoutParams
(int width, int height, float weight) Creates a new set of layout parameters with the specified width, height and weight.LayoutParams
(ViewGroup.LayoutParams source) Copy constructor. -
Method Summary
Methods inherited from class icyllis.modernui.view.ViewGroup.MarginLayoutParams
copyMarginsFrom, getLayoutDirection, getMarginEnd, getMarginStart, isLayoutRtl, isMarginRelative, onDebugDraw, resolveLayoutDirection, setLayoutDirection, setMarginEnd, setMargins, setMarginsRelative, setMarginStart
-
Field Details
-
weight
public float weightIndicates how much of the extra space in the LinearLayout will be allocated to the view associated with these LayoutParams. Specify 0 if the view should not be stretched. Otherwise the extra pixels will be pro-rated among all views whose weight is greater than 0. -
gravity
public int gravityGravity for the view associated with these LayoutParams.- See Also:
-
-
Constructor Details
-
LayoutParams
public LayoutParams(int width, int height) Creates a new set of layout parameters with the specified width and height.- Parameters:
width
- the width, eitherViewGroup.LayoutParams.WRAP_CONTENT
,ViewGroup.LayoutParams.MATCH_PARENT
, or a size in pixelsheight
- the height, eitherViewGroup.LayoutParams.WRAP_CONTENT
,ViewGroup.LayoutParams.MATCH_PARENT
, or a size in pixels
-
LayoutParams
public LayoutParams(int width, int height, float weight) Creates a new set of layout parameters with the specified width, height and weight.- Parameters:
width
- the width, eitherViewGroup.LayoutParams.MATCH_PARENT
,ViewGroup.LayoutParams.WRAP_CONTENT
or a fixed size in pixelsheight
- the height, eitherViewGroup.LayoutParams.MATCH_PARENT
,ViewGroup.LayoutParams.WRAP_CONTENT
or a fixed size in pixelsweight
- the weight
-
LayoutParams
-
LayoutParams
-
LayoutParams
Copy constructor. Clones the width, height, margin values, weight, and gravity of the source.- Parameters:
source
- The layout params to copy from.
-