applyWindowInsetsAsPadding

fun View.applyWindowInsetsAsPadding(left: Boolean = true, top: Boolean = true, right: Boolean = true, bottom: Boolean = true)

Applies window insets as padding to the view.
Useful for handling system bars and keyboard.

윈도우 인셋을 View의 패딩으로 적용합니다.
시스템 바 및 키보드 처리에 유용합니다.

Parameters

left

Whether to apply left inset as left padding (default: true).

왼쪽 인셋을 왼쪽 패딩으로 적용할지 여부 (기본값: true).

top

Whether to apply top inset as top padding (default: true).

상단 인셋을 상단 패딩으로 적용할지 여부 (기본값: true).

right

Whether to apply right inset as right padding (default: true).

오른쪽 인셋을 오른쪽 패딩으로 적용할지 여부 (기본값: true).

bottom

Whether to apply bottom inset as bottom padding (default: true).

하단 인셋을 하단 패딩으로 적용할지 여부 (기본값: true).