From 290a4199c7cc8168ee5e5ec3b556e4b780767a06 Mon Sep 17 00:00:00 2001 From: Jason Monk Date: Fri, 21 Apr 2017 11:51:17 -0400 Subject: [PATCH] Fix QS size on 320dp with big fonts Test: visual Change-Id: Id87425ba06962c4028374fdb71f2b996a4e966aa Fixes: 37561810 --- packages/SystemUI/res/values-sw410dp/config.xml | 1 + packages/SystemUI/res/values/config.xml | 1 + .../SystemUI/src/com/android/systemui/qs/PagedTileLayout.java | 3 +-- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/SystemUI/res/values-sw410dp/config.xml b/packages/SystemUI/res/values-sw410dp/config.xml index b04b28c709f51..362c1d214b0e5 100644 --- a/packages/SystemUI/res/values-sw410dp/config.xml +++ b/packages/SystemUI/res/values-sw410dp/config.xml @@ -21,6 +21,7 @@ for different hardware and product builds. --> 2 + 3 true diff --git a/packages/SystemUI/res/values/config.xml b/packages/SystemUI/res/values/config.xml index e9d6fec30aee0..fd7e165e11a9a 100644 --- a/packages/SystemUI/res/values/config.xml +++ b/packages/SystemUI/res/values/config.xml @@ -100,6 +100,7 @@ 1 + 2 1 diff --git a/packages/SystemUI/src/com/android/systemui/qs/PagedTileLayout.java b/packages/SystemUI/src/com/android/systemui/qs/PagedTileLayout.java index 9da52d08b88ff..f3417dc078c29 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/PagedTileLayout.java +++ b/packages/SystemUI/src/com/android/systemui/qs/PagedTileLayout.java @@ -279,8 +279,7 @@ public class PagedTileLayout extends ViewPager implements QSTileLayout { private int getRows() { final Resources res = getContext().getResources(); if (res.getConfiguration().orientation == Configuration.ORIENTATION_PORTRAIT) { - // Always have 3 rows in portrait. - return 3; + return res.getInteger(R.integer.quick_settings_num_rows_portrait); } return Math.max(1, res.getInteger(R.integer.quick_settings_num_rows)); }