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

Commit b886e41a authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fix weight of media to be 1 in landscape" into sc-dev

parents b436fb9f dec30a7f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -297,7 +297,7 @@ public class QSContainerImpl extends FrameLayout {
                // start margin of next page).
                qsPanelController.setPageMargin(mSideMargins);
            } else if (view == mHeader) {
                // No content padding for the header.
                quickStatusBarHeaderController.setContentMargins(mContentPadding, mContentPadding);
            } else {
                view.setPaddingRelative(
                        mContentPadding,
+1 −1
Original line number Diff line number Diff line
@@ -425,7 +425,7 @@ public class QSPanel extends LinearLayout implements Tunable {
            LinearLayout.LayoutParams layoutParams = (LayoutParams) hostView.getLayoutParams();
            layoutParams.height = ViewGroup.LayoutParams.WRAP_CONTENT;
            layoutParams.width = horizontal ? 0 : ViewGroup.LayoutParams.MATCH_PARENT;
            layoutParams.weight = horizontal ? 1.2f : 0;
            layoutParams.weight = horizontal ? 1f : 0;
            // Add any bottom margin, such that the total spacing is correct. This is only
            // necessary if the view isn't horizontal, since otherwise the padding is
            // carried in the parent of this view (to ensure correct vertical alignment)
+4 −1
Original line number Diff line number Diff line
@@ -177,7 +177,6 @@ class QuickStatusBarHeaderController extends ViewController<QuickStatusBarHeader
        mView.onAttach(mIconManager, mQSExpansionPathInterpolator);

        mDemoModeController.addCallback(mDemoModeReceiver);
        mHeaderQsPanelController.setContentMargins(0, 0);
    }

    @Override
@@ -253,6 +252,10 @@ class QuickStatusBarHeaderController extends ViewController<QuickStatusBarHeader
        return mMicCameraIndicatorsEnabled || mLocationIndicatorsEnabled;
    }

    public void setContentMargins(int marginStart, int marginEnd) {
        mHeaderQsPanelController.setContentMargins(marginStart, marginEnd);
    }

    private static class ClockDemoModeReceiver implements DemoMode {
        private Clock mClockView;