package com.casic.electric.detector.extensions

import android.content.Context
import android.view.ViewGroup
import com.pengxh.kt.lite.extensions.getStatusBarHeight

/**
 * 设置沉浸式状态栏，兼容Android 11+
 * */
fun Context.initLayoutImmersionBar(rootView: ViewGroup) {
    rootView.setPadding(0, this.getStatusBarHeight(), 0, 0)
    rootView.requestLayout()
}