WindowInsetsSides
value class WindowInsetsSides private constructor(private val value: Int)
WindowInsetsSides
is used in WindowInsets.only
to define which sides of the WindowInsets
should apply.
Functions
operator fun plus(sides: WindowInsetsSides): WindowInsetsSides
Returns a WindowInsetsSides
containing sides defied in sides
and the sides in this
.
Companion Object
Properties
val Start = AllowLeftInLtr + AllowRightInRtl
Indicates a WindowInsets
start side, which is left or right depending on
LayoutDirection
. If LayoutDirection.Ltr
, Start
is the left side. If
LayoutDirection.Rtl
, Start
is the right side.
Use Left
or Right
if the physical direction is required.
val End = AllowRightInLtr + AllowLeftInRtl
Indicates a WindowInsets
end side, which is left or right depending on
LayoutDirection
. If LayoutDirection.Ltr
, End
is the right side. If
LayoutDirection.Rtl
, End
is the left side.
Use Left
or Right
if the physical direction is required.
val Top = WindowInsetsSides(1 shl 4)
Indicates a WindowInsets
top side.
val Bottom = WindowInsetsSides(1 shl 5)
Indicates a WindowInsets
bottom side.
val Left = AllowLeftInLtr + AllowLeftInRtl
Indicates a WindowInsets
left side. Most layouts will prefer using Start
or End
to
account for LayoutDirection
.
val Right = AllowRightInLtr + AllowRightInRtl
Indicates a WindowInsets
right side. Most layouts will prefer using Start
or End
to
account for LayoutDirection
.
val Horizontal = Left + Right
Indicates a WindowInsets
horizontal sides. This is a combination of Left
and Right
sides, or Start
and End
sides.
val Vertical = Top + Bottom
Indicates a WindowInsets
Top
and Bottom
sides.