@Override protected void notifySizeChanged(float width, float height, int orientation) { super.notifySizeChanged(width, height, orientation); if (mReaderModePanel == null) return; final boolean isToolbarVisible = getHeight() == getHeightMinusTopControls(); final float dpToPx = getContext().getResources().getDisplayMetrics().density; mReaderModePanel.onSizeChanged(width, height, isToolbarVisible, dpToPx); }