set Edge To Edge Mode
Enables or disables edge-to-edge mode.
When enabled, the layout extends behind system bars (StatusBar and NavigationBar).
When disabled, the layout starts below system bars (default behavior).
edge-to-edge 모드를 활성화하거나 비활성화합니다.
활성화 시 레이아웃이 시스템 바(StatusBar와 NavigationBar) 뒤까지 확장됩니다.
비활성화 시 레이아웃은 시스템 바 아래부터 시작합니다 (기본 동작).
Important / 주의사항:
When edge-to-edge is enabled, you must manually handle WindowInsets to avoid content being drawn behind system bars.
Use ViewCompat.setOnApplyWindowInsetsListener() or apply padding/margin based on WindowInsets.
When edge-to-edge is disabled, system automatically adds padding for system bars (default Android behavior).
edge-to-edge 활성화 시, 컨텐츠가 시스템 바 뒤에 그려지는 것을 방지하기 위해 WindowInsets를 수동으로 처리해야 합니다.
ViewCompat.setOnApplyWindowInsetsListener()를 사용하거나 WindowInsets 기반으로 패딩/마진을 적용하세요.
edge-to-edge 비활성화 시, 시스템이 자동으로 시스템 바에 대한 패딩을 추가합니다 (기본 Android 동작).
Usage / 사용법:
// Enable edge-to-edge mode
controller.setEdgeToEdgeMode(true)
// Now handle WindowInsets in your layout
ViewCompat.setOnApplyWindowInsetsListener(rootView) { view, insets ->
val systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars())
view.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom)
insets
}
// Disable edge-to-edge mode (return to default)
controller.setEdgeToEdgeMode(false)
```<br><br>
```kotlin
// edge-to-edge 모드 활성화
controller.setEdgeToEdgeMode(true)
// 이제 레이아웃에서 WindowInsets 처리
ViewCompat.setOnApplyWindowInsetsListener(rootView) { view, insets ->
val systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars())
view.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom)
insets
}
// edge-to-edge 모드 비활성화 (기본값으로 복귀)
controller.setEdgeToEdgeMode(false)
```<br>
@param enabled true to enable edge-to-edge mode, false to disable (default mode).<br><br>
edge-to-edge 모드를 활성화하려면 true, 비활성화(기본 모드)하려면 false.<br>