INNER CODE UNIT · Kotlin

configureInsets

jarnedemeulemeester/findroid · app/phone/src/main/java/dev/jdtech/jellyfin/BasePlayerActivity.kt:75

    protected fun configureInsets(playerControls: View) {
        playerControls.setOnApplyWindowInsetsListener { _, windowInsets ->
            val cutout = windowInsets.displayCutout
            playerControls.updatePadding(
                left = cutout?.safeInsetLeft ?: 0,
                top = cutout?.safeInsetTop ?: 0,
                right = cutout?.safeInsetRight ?: 0,
                bottom = cutout?.safeInsetBottom ?: 0,
            )
            return@setOnApplyWindowInsetsListener windowInsets
        }
    }
}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…