diff options
author | Roman Birg <roman@cyngn.com> | 2016-01-22 13:25:36 -0800 |
---|---|---|
committer | Roman Birg <roman@cyngn.com> | 2016-01-25 14:19:41 -0800 |
commit | ed83ebc8520834b83cae84c0ccd7d8d41432e174 (patch) | |
tree | ed2342d9fdeb331d95d44deda658e4eb9a646ea2 /packages/SystemUI/src | |
parent | 1a99a4a44b776b033643197ac1bfa953875e517d (diff) | |
download | frameworks_base-ed83ebc8520834b83cae84c0ccd7d8d41432e174.zip frameworks_base-ed83ebc8520834b83cae84c0ccd7d8d41432e174.tar.gz frameworks_base-ed83ebc8520834b83cae84c0ccd7d8d41432e174.tar.bz2 |
SystemUI: initialize drag panel with proper column count
Otherwise first layout can lead to awkward layout with two rows.
Ref: CYNGNOS-1601
Change-Id: Ia80b1ea7dba282e695d2b967cc1d7ed876529618
Signed-off-by: Roman Birg <roman@cyngn.com>
Diffstat (limited to 'packages/SystemUI/src')
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/qs/QSDragPanel.java | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/qs/QSDragPanel.java b/packages/SystemUI/src/com/android/systemui/qs/QSDragPanel.java index 397bd69..63e97da 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/QSDragPanel.java +++ b/packages/SystemUI/src/com/android/systemui/qs/QSDragPanel.java @@ -752,7 +752,8 @@ public class QSDragPanel extends QSPanel implements View.OnDragListener, View.On mPageIndicator.measure(exactly(width), atMost(mPageIndicatorHeight)); mFooter.getView().measure(exactly(width), MeasureSpec.UNSPECIFIED); - int h = mViewPager.getMeasuredHeight() + mPageIndicatorHeight; + int h = getRowTop(getCurrentMaxRow() + 1) + mPanelPaddingBottom; + if (mFooter.hasFooter()) { h += mFooter.getView().getMeasuredHeight(); } @@ -1730,11 +1731,11 @@ public class QSDragPanel extends QSPanel implements View.OnDragListener, View.On mDualTileUnderlap = res.getDimensionPixelSize(R.dimen.qs_dual_tile_padding_vertical); mBrightnessPaddingTop = res.getDimensionPixelSize(R.dimen.qs_brightness_padding_top); mPageIndicatorHeight = res.getDimensionPixelSize(R.dimen.qs_panel_page_indicator_height); + if (mColumns != columns) { + mColumns = columns; + if (isLaidOut()) postInvalidate(); + } if (isLaidOut()) { - if (mColumns != columns) { - mColumns = columns; - postInvalidate(); - } for (TileRecord r : mRecords) { r.tile.clearState(); } |