WindowInsetsProviders

提供了用于获取预定义 WindowInsets 以及创建和操作它们的工厂方法。

Author

M8Test, [email protected], https://m8test.com

Functions

Link copied to clipboard
abstract fun addTo(first: WindowInsets, second: WindowInsets): WindowInsets

返回一个新的 WindowInsets,其值为两个输入边衬区相加的结果。

Link copied to clipboard
abstract fun createFromDp(left: (Dimensions) -> Dp, top: (Dimensions) -> Dp, right: (Dimensions) -> Dp, bottom: (Dimensions) -> Dp): WindowInsets

使用固定的 Dp 值创建一个 WindowInsets

Link copied to clipboard
abstract fun createFromInts(left: Int, top: Int, right: Int, bottom: Int): WindowInsets

使用固定的像素值创建一个 WindowInsets

Link copied to clipboard
abstract fun excludeFrom(included: WindowInsets, excluded: WindowInsets): WindowInsets

返回一个新的 WindowInsets,其值为 included 中未被 excluded 覆盖的部分。

Link copied to clipboard

返回一个新的 WindowInsets,仅保留原边衬区中由 sides 指定的边。

Link copied to clipboard
abstract fun unionWith(first: WindowInsets, second: WindowInsets): WindowInsets

返回一个新的 WindowInsets,其值为两个输入边衬区的最大值。