Revert "Fix hotseat width to span a number of columns"
Revert submission 17983445-hotseat_span
Reason for revert: b/231283023
Reverted Changes:
Ice4e37929:Fix hotseat width to span a number of columns
I9ed508490:Fix hotseat width to span a number of columns
Change-Id: Iabf67c5efd8155131a0c8a88192ddd671a43747b
diff --git a/src/com/android/launcher3/Hotseat.java b/src/com/android/launcher3/Hotseat.java
index 76106fc..a9db5ce 100644
--- a/src/com/android/launcher3/Hotseat.java
+++ b/src/com/android/launcher3/Hotseat.java
@@ -173,9 +173,17 @@
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
- int qsbWidth = mActivity.getDeviceProfile().qsbWidth;
+ int width;
+ if (mActivity.getDeviceProfile().isQsbInline) {
+ width = mActivity.getDeviceProfile().qsbWidth;
+ } else {
+ MarginLayoutParams qsbParams = (MarginLayoutParams) mQsb.getLayoutParams();
+ width = getShortcutsAndWidgets().getMeasuredWidth()
+ - qsbParams.getMarginStart()
+ - qsbParams.getMarginEnd();
+ }
- mQsb.measure(MeasureSpec.makeMeasureSpec(qsbWidth, MeasureSpec.EXACTLY),
+ mQsb.measure(MeasureSpec.makeMeasureSpec(width, MeasureSpec.EXACTLY),
MeasureSpec.makeMeasureSpec(mQsbHeight, MeasureSpec.EXACTLY));
}