I simply need to detect if the navigation bar Is located to the right of the screen as seen in image below. Thanks

I simply need to detect if the navigation bar Is located to the right of the screen as seen in image below. Thanks

The following snippet could help:
private boolean isNavigationBarRightOfContent(){
Rect outRect = new Rect();
ViewGroup decor = (ViewGroup) mActivity.getWindow().getDecorView();
decor.getWindowVisibleDisplayFrame(outRect);
DisplayMetrics dm = getResources().getDisplayMetrics();
return dm.widthPixels == outRect.bottom;
}
The Navigation Bar will only be to the right of the screen if it is in landscape mode. So to detect this, use getResources().getConfiguration().orientation like this:
String orientation = getResources().getConfiguration().orientation;
if(orientation.equals("ORIENTATION_LANDSCAPE"){
// screen in landscape, do what you want to do
}
Try this:
// retrieve the position of the DecorView
Rect visibleFrame = new Rect();
getWindow().getDecorView().getWindowVisibleDisplayFrame(visibleFrame);
DisplayMetrics dm = getResources().getDisplayMetrics();
// check if the DecorView takes the whole screen vertically or horizontally
boolean isRightOfContent = dm.heightPixels == visibleFrame.bottom;
boolean isBelowContent = dm.widthPixels == visibleFrame.right;