Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 64fc4631 authored by Winson Chung's avatar Winson Chung Committed by Android (Google) Code Review
Browse files

Merge "Ensure margins for floating rotation button account for corner insets" into qt-dev

parents f3825f11 082e8dfb
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -57,7 +57,7 @@
    <item name="navigation_luminance_change_threshold" type="dimen" format="float">0.05</item>

    <dimen name="floating_rotation_button_diameter">40dp</dimen>
    <dimen name="floating_rotation_button_margin">4dp</dimen>
    <dimen name="floating_rotation_button_min_margin">4dp</dimen>

    <!-- Height of notification icons in the status bar -->
    <dimen name="status_bar_icon_size">@*android:dimen/status_bar_icon_size</dimen>
+4 −3
Original line number Diff line number Diff line
@@ -51,9 +51,10 @@ public class FloatingRotationButton implements RotationButton {
                R.layout.rotate_suggestion, null);
        mKeyButtonView.setVisibility(View.VISIBLE);

        Resources resources = mContext.getResources();
        mDiameter = resources.getDimensionPixelSize(R.dimen.floating_rotation_button_diameter);
        mMargin = resources.getDimensionPixelSize(R.dimen.floating_rotation_button_margin);
        Resources res = mContext.getResources();
        mDiameter = res.getDimensionPixelSize(R.dimen.floating_rotation_button_diameter);
        mMargin = Math.max(res.getDimensionPixelSize(R.dimen.floating_rotation_button_min_margin),
                res.getDimensionPixelSize(R.dimen.rounded_corner_content_padding));
    }

    @Override