How to detect that navbar is disabled?

Vadim Shved

Senior Member
Mar 31, 2013
88
279
0
C:/Ukraine/Sumy/
Hi. I am developing an AR app. In my AR fragment I want to use transparent navbar and set the whole activity to fit the display with
Code:
getWindow().addFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS)
So after that i want to set a bottom padding for BottomNavigationView with the height of navbar. To detect the navbar i use those system params:
Code:
int id = resources.getIdentifier("config_showNavigationBar", "bool", "android");
int resourceId = context.getResources().getIdentifier("navigation_bar_height", "dimen", "android");
But on OnePlus this does not work when phone has disabled nabar - my bottomnavigationview is flying and does not align the bottom of the screen.
So, the question again: how to detect that navbar is disabled and the phone is using gestures?