I have already tried the methods you suggested, including setting the SYSTEM_UI_FLAG_IMMERSIVE_STICKY | SYSTEM_UI_FLAG_HIDE_NAVIGATION | FLAG_LAYOUT_NO_LIMITS flags, as well as adding android:windowLayoutInDisplayCutoutMode="shortEdges" in AndroidManifest.xml, but the problem still persists. When the virtual keyboard pops up, a black bar still appears in the original navigation bar position.