I still have not found a way to configure MapView hieght on the Android status bar, which is unsuccessful.
However, in the case of PopupWindow, it is enough to know the height of the Android status bar, since it is placed on the screen by the encoder. The encoder can then make its own strategy around the problem.
According to another post, here's how to do it:
Rect rectgle = new Rect(); Window window = getWindow(); window.getDecorView().getWindowVisibleDisplayFrame(rectgle); statusBarHeight = rectgle.top;
However, be careful not to do this calculation until all window components are initialized, because otherwise it will be zero. This is easy to spot and fix.
BR, Vanja
source share