My device is Nexus 7(Flo) .I want to get the real screen resolution,which the height is 1920,But the code
DisplayMetrics displayMetrics = mContext.getResources().getDisplayMetrics();
int mPageHeight = displayMetrics.heightPixels;
returns 1824, which is the result of 1920 minus the NavigationBar's height(48dp). I know in Immersive Mode the decorView's height is 1920.But I want to acquire the value in "onCreate" method in Activity. DecorView's height is assigned too late.
So how to get the real screen resolution height?
Or is there a reliable way to know if the NavigationBar at bottom is showing ?You know most devices don't have that NavigationBar.