library / dev.chrisbanes.insetter / Insetter / applyInsetsToView

applyInsetsToView

open static fun applyInsetsToView(@NonNull view: View, @NonNull insets: WindowInsetsCompat, @NonNull initialState: ViewState, @Nullable paddingSystemWindowInsets: EnumSet<InsetDimension!>?, @Nullable marginSystemWindowInsets: EnumSet<InsetDimension!>?, @Nullable paddingSystemGestureInsets: EnumSet<InsetDimension!>?, @Nullable marginSystemGestureInsets: EnumSet<InsetDimension!>?): Unit

A convenience function which applies insets to a view.

How the given insets are applied depends on the options provided via the various parameters. Each of paddingSystemWindowInsets, marginSystemWindowInsets, paddingSystemGestureInsets and marginSystemGestureInsets take an EnumSet of InsetDimension values.

Parameters

view - View: the view to apply inset handling too

insets - WindowInsetsCompat: the insets to apply

initialState - ViewState: the initial view state of the view

paddingSystemWindowInsets - EnumSet<InsetDimension!>?: enum set defining padding handling of system window insets

marginSystemWindowInsets - EnumSet<InsetDimension!>?: enum set defining margin handling of system window insets

paddingSystemGestureInsets - EnumSet<InsetDimension!>?: enum set defining padding handling of system gesture insets

marginSystemGestureInsets - EnumSet<InsetDimension!>?: enum set defining margin handling of system gesture insets

open static fun applyInsetsToView(@NonNull view: View, @NonNull insets: WindowInsetsCompat, @NonNull initialState: ViewState, paddingSystemWindowLeft: Boolean, paddingSystemWindowTop: Boolean, paddingSystemWindowRight: Boolean, paddingSystemWindowBottom: Boolean, paddingSystemGestureLeft: Boolean, paddingSystemGestureTop: Boolean, paddingSystemGestureRight: Boolean, paddingSystemGestureBottom: Boolean, marginSystemWindowLeft: Boolean, marginSystemWindowTop: Boolean, marginSystemWindowRight: Boolean, marginSystemWindowBottom: Boolean, marginSystemGestureLeft: Boolean, marginSystemGestureTop: Boolean, marginSystemGestureRight: Boolean, marginSystemGestureBottom: Boolean): Unit