Merge "Fix weight of media to be 1 in landscape" into sc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
b886e41ad3
@@ -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,
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user