library / dev.chrisbanes.insetter / Insetter / applyInsetsToView

applyInsetsToView

fun applyInsetsToView(@NonNull view: View, @NonNull insets: WindowInsetsCompat, @NonNull initialState: ViewState): 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 accept side flag 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