I need to check if the device has a soft navigation bar, and I followed the suggestions here .
It works great, except for onePlus devices, for some reason, this code:
int id = resources.getIdentifier("config_showNavigationBar", "bool", android"); return id > 0 && resources.getBoolean(id);
returns false, although a soft navigation bar is displayed.
Any idea how I can get the correct result?
I prefer not to calculate the actual width and the available width, this seems like an expensive job.
Thanks.
source share