BoxInsetLayout.LayoutParams

public class BoxInsetLayout.LayoutParams


Per-child layout information for layouts that support margins, gravity and boxedEdges. See BoxInsetLayout Layout Attributes for a list of all child view attributes that this class supports. layout_boxedEdges

Summary

Constants

static final @NonNull int

The view will force an inset on all of the edges of the children.

static final @NonNull int

The view will force an inset on the bottom edge of the children.

static final @NonNull int

The view will force an inset on the left edge of the children.

static final @NonNull int

Default boxing setting.

static final @NonNull int

The view will force an inset on the right edge of the children.

static final @NonNull int

The view will force an inset on the top edge of the children.

Public fields

@BoxInsetLayout.LayoutParams.BoxedEdges @NonNull int

Specifies the screen-specific insets for each of the child edges.

Public constructors

Copy constructor.

Copy constructor.

Copy constructor.

Copy constructor.

Creates a new set of layout parameters.

LayoutParams(@NonNull int width, @NonNull int height)

Creates a new set of layout parameters with the specified width and height.

LayoutParams(@NonNull int width, @NonNull int height, @NonNull int gravity)

Creates a new set of layout parameters with the specified width, height and gravity.

LayoutParams(
    @NonNull int width,
    @NonNull int height,
    @NonNull int gravity,
    @BoxInsetLayout.LayoutParams.BoxedEdges @NonNull int boxed
)

Inherited methods

From class ViewGroup.MarginLayoutParams
@NonNull int
@NonNull int
@NonNull int
@NonNull boolean
@NonNull void
resolveLayoutDirection(@NonNull int layoutDirection)
@NonNull void
setLayoutDirection(@NonNull int layoutDirection)
@NonNull void
@NonNull void
setMarginStart(@NonNull int start)
@NonNull void
setMargins(
    @NonNull int left,
    @NonNull int top,
    @NonNull int right,
    @NonNull int bottom
)

Constants

BOX_ALL

@NonNull
public static final @NonNull int BOX_ALL

The view will force an inset on all of the edges of the children.

BOX_BOTTOM

@NonNull
public static final @NonNull int BOX_BOTTOM

The view will force an inset on the bottom edge of the children.

BOX_LEFT

@NonNull
public static final @NonNull int BOX_LEFT

The view will force an inset on the left edge of the children.

BOX_NONE

@NonNull
public static final @NonNull int BOX_NONE

Default boxing setting. There are no insets forced on the child views.

BOX_RIGHT

@NonNull
public static final @NonNull int BOX_RIGHT

The view will force an inset on the right edge of the children.

BOX_TOP

@NonNull
public static final @NonNull int BOX_TOP

The view will force an inset on the top edge of the children.

Public fields

boxedEdges

@BoxInsetLayout.LayoutParams.BoxedEdges
@NonNull
public @BoxInsetLayout.LayoutParams.BoxedEdges @NonNull int boxedEdges

Specifies the screen-specific insets for each of the child edges.

Public constructors

LayoutParams

public LayoutParams(@NonNull ViewGroup.LayoutParams source)

Copy constructor. Clones the width and height of the source.

Parameters
@NonNull ViewGroup.LayoutParams source

The layout params to copy from.

LayoutParams

public LayoutParams(@NonNull ViewGroup.MarginLayoutParams source)

Copy constructor. Clones the width, height and margin values.

Parameters
@NonNull ViewGroup.MarginLayoutParams source

The layout params to copy from.

LayoutParams

public LayoutParams(@NonNull FrameLayout.LayoutParams source)

Copy constructor. Clones the width, height, margin values, and gravity of the source.

Parameters
@NonNull FrameLayout.LayoutParams source

The layout params to copy from.

LayoutParams

public LayoutParams(@NonNull BoxInsetLayout.LayoutParams source)

Copy constructor. Clones the width, height, margin values, boxedEdges and gravity of the source.

Parameters
@NonNull BoxInsetLayout.LayoutParams source

The layout params to copy from.

LayoutParams

public LayoutParams(@NonNull Context context, @Nullable AttributeSet attrs)

Creates a new set of layout parameters. The values are extracted from the supplied attributes set and context.

Parameters
@NonNull Context context

the application environment

@Nullable AttributeSet attrs

the set of attributes from which to extract the layout parameters' values

LayoutParams

public LayoutParams(@NonNull int width, @NonNull int height)

Creates a new set of layout parameters with the specified width and height.

Parameters
@NonNull int width

the width, either MATCH_PARENT, WRAP_CONTENT or a fixed size in pixels

@NonNull int height

the height, either MATCH_PARENT, WRAP_CONTENT or a fixed size in pixelsy

LayoutParams

public LayoutParams(@NonNull int width, @NonNull int height, @NonNull int gravity)

Creates a new set of layout parameters with the specified width, height and gravity.

Parameters
@NonNull int width

the width, either MATCH_PARENT, WRAP_CONTENT or a fixed size in pixels

@NonNull int height

the height, either MATCH_PARENT, WRAP_CONTENT or a fixed size in pixels

@NonNull int gravity

the gravity

See also
Gravity

LayoutParams

public LayoutParams(
    @NonNull int width,
    @NonNull int height,
    @NonNull int gravity,
    @BoxInsetLayout.LayoutParams.BoxedEdges @NonNull int boxed
)