package com.adealink.weparty.commonui.util

import android.content.Context
import android.util.DisplayMetrics
import android.view.WindowManager

/**
 * Created by XiaoDongLin.
 * Date: 2025/5/8
 */
fun isNavigationBarVisible(context: Context): Boolean {
    val displayMetrics = DisplayMetrics()
    val display = (context.getSystemService(Context.WINDOW_SERVICE) as WindowManager).defaultDisplay
    display.getRealMetrics(displayMetrics)
    val realHeight = displayMetrics.heightPixels
    display.getMetrics(displayMetrics)
    val availableHeight = displayMetrics.heightPixels

    return realHeight > availableHeight
}
