BoxInsetLayout.LayoutParams

Added in 1.1.0

public class BoxInsetLayout.LayoutParams extends FrameLayout.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 int
BOX_ALL = 15

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

static final int

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

static final int

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

static final int

Default boxing setting.

static final int

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

static final int

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

Public fields

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(int width, int height)

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

LayoutParams(int width, int height, int gravity)

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

LayoutParams(int width, int height, int gravity, int boxed)

Inherited Constants

From android.widget.FrameLayout.LayoutParams
static final int
From android.view.ViewGroup.LayoutParams
static final int

This field is deprecated.

static final int
static final int

Inherited methods

From android.view.ViewGroup.LayoutParams
void
setBaseAttributes(TypedArray a, int widthAttr, int heightAttr)
From android.view.ViewGroup.MarginLayoutParams
int
int
int
boolean
void
resolveLayoutDirection(int layoutDirection)
void
setLayoutDirection(int layoutDirection)
void
setMarginEnd(int end)
void
setMarginStart(int start)
void
setMargins(int left, int top, int right, int bottom)

Constants

BOX_ALL

Added in 1.1.0
public static final int BOX_ALL = 15

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

BOX_BOTTOM

Added in 1.1.0
public static final int BOX_BOTTOM = 8

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

BOX_LEFT

Added in 1.1.0
public static final int BOX_LEFT = 1

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

BOX_NONE

Added in 1.1.0
public static final int BOX_NONE = 0

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

BOX_RIGHT

Added in 1.1.0
public static final int BOX_RIGHT = 4

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

BOX_TOP

Added in 1.1.0
public static final int BOX_TOP = 2

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

Public fields

boxedEdges

Added in 1.1.0
public int boxedEdges

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

Public constructors

LayoutParams

Added in 1.1.0
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

Added in 1.1.0
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

Added in 1.1.0
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

Added in 1.1.0
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

Added in 1.1.0
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

Added in 1.1.0
public LayoutParams(int width, int height)

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

Parameters
int width

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

int height

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

LayoutParams

Added in 1.1.0
public LayoutParams(int width, int height, int gravity)

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

Parameters
int width

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

int height

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

int gravity

the gravity

See also
Gravity

LayoutParams

Added in 1.1.0
public LayoutParams(int width, int height, int gravity, int boxed)