BoxInsetLayout

@UiThread public class BoxInsetLayout


BoxInsetLayout is a screen shape-aware ViewGroup that can box its children in the center square of a round screen by using the layout_boxedEdges attribute. The values for this attribute specify the child's edges to be boxed in: left|top|right|bottom or all. The layout_boxedEdges attribute is ignored on a device with a rectangular screen.

Summary

Nested types

BoxInsetLayout.LayoutParams

Per-child layout information for layouts that support margins, gravity and boxedEdges.

Public constructors

Simple constructor to use when creating a view from code.

Constructor that is called when inflating a view from XML.

BoxInsetLayout(
    @NonNull Context context,
    @Nullable AttributeSet attrs,
    @StyleRes @NonNull int defStyle
)

Perform inflation from XML and apply a class-specific base style from a theme attribute.