BoxInsetLayout.LayoutParams
public
static
class
BoxInsetLayout.LayoutParams
extends FrameLayout.LayoutParams
| java.lang.Object | ||||
| ↳ | android.view.ViewGroup.LayoutParams | |||
| ↳ | android.view.ViewGroup.MarginLayoutParams | |||
| ↳ | android.widget.FrameLayout.LayoutParams | |||
| ↳ | androidx.wear.widget.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.
R.attr.layout_boxedEdges
Summary
Constants | |
|---|---|
int |
BOX_ALL
The view will force an inset on all of the edges of the children. |
int |
BOX_BOTTOM
The view will force an inset on the bottom edge of the children. |
int |
BOX_LEFT
The view will force an inset on the left edge of the children. |
int |
BOX_NONE
Default boxing setting. |
int |
BOX_RIGHT
The view will force an inset on the right edge of the children. |
int |
BOX_TOP
The view will force an inset on the top edge of the children. |
Inherited constants |
|---|
Fields | |
|---|---|
public
int |
boxedEdges
Specifies the screen-specific insets for each of the child edges. |
Inherited fields |
|---|
Public constructors | |
|---|---|
LayoutParams(Context context, AttributeSet attrs)
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)
|
|
LayoutParams(ViewGroup.LayoutParams source)
Copy constructor. |
|
LayoutParams(ViewGroup.MarginLayoutParams source)
Copy constructor. |
|
LayoutParams(FrameLayout.LayoutParams source)
Copy constructor. |
|
LayoutParams(BoxInsetLayout.LayoutParams source)
Copy constructor. |
|
Inherited methods | |
|---|---|
Constants
BOX_ALL
public static final int BOX_ALL
The view will force an inset on all of the edges of the children.
Constant Value: 15 (0x0000000f)
BOX_BOTTOM
public static final int BOX_BOTTOM
The view will force an inset on the bottom edge of the children.
Constant Value: 8 (0x00000008)
BOX_LEFT
public static final int BOX_LEFT
The view will force an inset on the left edge of the children.
Constant Value: 1 (0x00000001)
BOX_NONE
public static final int BOX_NONE
Default boxing setting. There are no insets forced on the child views.
Constant Value: 0 (0x00000000)
BOX_RIGHT
public static final int BOX_RIGHT
The view will force an inset on the right edge of the children.
Constant Value: 4 (0x00000004)
BOX_TOP
public static final int BOX_TOP
The view will force an inset on the top edge of the children.
Constant Value: 2 (0x00000002)
Fields
boxedEdges
public int boxedEdges
Specifies the screen-specific insets for each of the child edges.
Public constructors
LayoutParams
public LayoutParams (Context context, AttributeSet attrs)
Creates a new set of layout parameters. The values are extracted from the supplied attributes set and context.
| Parameters | |
|---|---|
context |
Context: the application environment |
attrs |
AttributeSet: the set of attributes from which to extract the layout parameters' values
|
LayoutParams
public LayoutParams (int width,
int height)
Creates a new set of layout parameters with the specified width and height.
| Parameters | |
|---|---|
width |
int: the width, either ViewGroup.LayoutParams.MATCH_PARENT,
ViewGroup.LayoutParams.WRAP_CONTENT or a fixed size in pixels |
height |
int: the height, either ViewGroup.LayoutParams.MATCH_PARENT,
ViewGroup.LayoutParams.WRAP_CONTENT or a fixed size in pixelsy
|
LayoutParams
public LayoutParams (int width,
int height,
int gravity)
Creates a new set of layout parameters with the specified width, height and gravity.
| Parameters | |
|---|---|
width |
int: the width, either ViewGroup.LayoutParams.MATCH_PARENT,
ViewGroup.LayoutParams.WRAP_CONTENT or a fixed size in pixels |
height |
int: the height, either ViewGroup.LayoutParams.MATCH_PARENT,
ViewGroup.LayoutParams.WRAP_CONTENT or a fixed size in pixels |
gravity |
int: the gravity |
See also:
LayoutParams
public LayoutParams (int width,
int height,
int gravity,
int boxed)
| Parameters | |
|---|---|
width |
int |
height |
int |
gravity |
int |
boxed |
int |
LayoutParams
public LayoutParams (ViewGroup.LayoutParams source)
Copy constructor. Clones the width and height of the source.
| Parameters | |
|---|---|
source |
ViewGroup.LayoutParams: The layout params to copy from.
|
LayoutParams
public LayoutParams (ViewGroup.MarginLayoutParams source)
Copy constructor. Clones the width, height and margin values.
| Parameters | |
|---|---|
source |
ViewGroup.MarginLayoutParams: The layout params to copy from.
|
LayoutParams
public LayoutParams (FrameLayout.LayoutParams source)
Copy constructor. Clones the width, height, margin values, and gravity of the source.
| Parameters | |
|---|---|
source |
FrameLayout.LayoutParams: The layout params to copy from.
|
LayoutParams
public LayoutParams (BoxInsetLayout.LayoutParams source)
Copy constructor. Clones the width, height, margin values, boxedEdges and gravity of the source.
| Parameters | |
|---|---|
source |
BoxInsetLayout.LayoutParams: The layout params to copy from.
|