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`

public static class LinearLayout.LayoutParams extends ViewGroup.MarginLayoutParams
Per-child layout information associated with ViewLinearLayout.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `int`
  `gravity`
  Gravity for the view associated with these LayoutParams.
  `float`
  `weight`
  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

  Constructors
  Constructor
  Description
  `LayoutParams(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)`
  `LayoutParams(ViewGroup.MarginLayoutParams source)`
  `LayoutParams(LinearLayout.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`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### weight

    public float weight
    Indicates 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 gravity
    Gravity for the view associated with these LayoutParams.
    See Also:
      - `Gravity`

- ## 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, either `ViewGroup.LayoutParams.WRAP_CONTENT`, `ViewGroup.LayoutParams.MATCH_PARENT`, or a size in pixels
      `height` - the height, either `ViewGroup.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, either `ViewGroup.LayoutParams.MATCH_PARENT`, `ViewGroup.LayoutParams.WRAP_CONTENT` or a fixed size in pixels
      `height` - the height, either `ViewGroup.LayoutParams.MATCH_PARENT`, `ViewGroup.LayoutParams.WRAP_CONTENT` or a fixed size in pixels
      `weight` - the weight

  - ### LayoutParams

    public LayoutParams(@Nonnull ViewGroup.LayoutParams source)

  - ### LayoutParams

    public LayoutParams(@Nonnull ViewGroup.MarginLayoutParams source)

  - ### LayoutParams

    public LayoutParams(@Nonnull LinearLayout.LayoutParams source)
    Copy constructor. Clones the width, height, margin values, weight, and gravity of the source.
    Parameters:
      `source` - The layout params to copy from.