Loading core/java/com/android/internal/widget/floatingtoolbar/LocalFloatingToolbarPopup.java +9 −4 Original line number Diff line number Diff line Loading @@ -435,10 +435,15 @@ public final class LocalFloatingToolbarPopup implements FloatingToolbarPopup { private void refreshCoordinatesAndOverflowDirection(Rect contentRectOnScreen) { refreshViewPort(); // Initialize x ensuring that the toolbar isn't rendered behind the nav bar in // landscape. final int x = Math.clamp(contentRectOnScreen.centerX() - mPopupWindow.getWidth() / 2, final int x; if (mPopupWindow.getWidth() > mViewPortOnScreen.width()) { // Not enough space - prefer to position as far left as possible x = mViewPortOnScreen.left; } else { // Initialize x ensuring that the toolbar isn't rendered behind the system bar insets x = Math.clamp(contentRectOnScreen.centerX() - mPopupWindow.getWidth() / 2, mViewPortOnScreen.left, mViewPortOnScreen.right - mPopupWindow.getWidth()); } final int y; Loading Loading
core/java/com/android/internal/widget/floatingtoolbar/LocalFloatingToolbarPopup.java +9 −4 Original line number Diff line number Diff line Loading @@ -435,10 +435,15 @@ public final class LocalFloatingToolbarPopup implements FloatingToolbarPopup { private void refreshCoordinatesAndOverflowDirection(Rect contentRectOnScreen) { refreshViewPort(); // Initialize x ensuring that the toolbar isn't rendered behind the nav bar in // landscape. final int x = Math.clamp(contentRectOnScreen.centerX() - mPopupWindow.getWidth() / 2, final int x; if (mPopupWindow.getWidth() > mViewPortOnScreen.width()) { // Not enough space - prefer to position as far left as possible x = mViewPortOnScreen.left; } else { // Initialize x ensuring that the toolbar isn't rendered behind the system bar insets x = Math.clamp(contentRectOnScreen.centerX() - mPopupWindow.getWidth() / 2, mViewPortOnScreen.left, mViewPortOnScreen.right - mPopupWindow.getWidth()); } final int y; Loading