Loading packages/SystemUI/res/layout/qs_customize_layout.xml +0 −8 Original line number Diff line number Diff line Loading @@ -21,14 +21,6 @@ android:layout_height="wrap_content" android:orientation="vertical"> <com.android.systemui.qs.QuickTileLayout android:id="@+id/quick_tile_layout" android:layout_width="match_parent" android:layout_height="@dimen/qs_quick_actions_height" android:orientation="horizontal" android:paddingStart="@dimen/qs_quick_actions_padding" android:paddingEnd="@dimen/qs_quick_actions_padding" /> <view class="com.android.systemui.qs.PagedTileLayout$TilePage" android:id="@+id/tile_page" Loading packages/SystemUI/res/values-land/config.xml +2 −0 Original line number Diff line number Diff line Loading @@ -38,4 +38,6 @@ while the stack is not focused. --> <item name="recents_layout_unfocused_range_min" format="float" type="integer">-2</item> <item name="recents_layout_unfocused_range_max" format="float" type="integer">1.5</item> <integer name="quick_settings_num_columns">4</integer> </resources> packages/SystemUI/res/values-sw600dp-land/config.xml +2 −0 Original line number Diff line number Diff line Loading @@ -18,4 +18,6 @@ <!-- The maximum count of notifications on Keyguard. The rest will be collapsed in an overflow card. --> <integer name="keyguard_max_notification_count">3</integer> <integer name="quick_settings_num_columns">3</integer> </resources> packages/SystemUI/res/values/dimens.xml +1 −3 Original line number Diff line number Diff line Loading @@ -134,9 +134,7 @@ <dimen name="pull_span_min">25dp</dimen> <dimen name="qs_tile_height">88dp</dimen> <dimen name="qs_new_tile_height">100dp</dimen> <dimen name="qs_quick_actions_height">88dp</dimen> <dimen name="qs_quick_actions_padding">25dp</dimen> <dimen name="qs_tile_margin">16dp</dimen> <dimen name="qs_quick_tile_size">48dp</dimen> <dimen name="qs_quick_tile_padding">12dp</dimen> <dimen name="qs_date_anim_translation">44.5dp</dimen> Loading packages/SystemUI/src/com/android/systemui/qs/PagedTileLayout.java +31 −16 Original line number Diff line number Diff line Loading @@ -62,27 +62,32 @@ public class PagedTileLayout extends ViewPager implements QSTileLayout { @Override public int getOffsetTop(TileRecord tile) { return ((ViewGroup) tile.tileView.getParent()).getTop(); return ((ViewGroup) tile.tileView.getParent()).getTop() + getTop(); } @Override public void addTile(TileRecord tile) { mTiles.add(tile); distributeTiles(); postDistributeTiles(); } @Override public void removeTile(TileRecord tile) { if (mTiles.remove(tile)) { distributeTiles(); postDistributeTiles(); } } private void postDistributeTiles() { removeCallbacks(mDistribute); post(mDistribute); } private void distributeTiles() { if (DEBUG) Log.d(TAG, "Distributing tiles"); final int NP = mPages.size(); for (int i = 0; i < NP; i++) { mPages.get(i).clear(); mPages.get(i).removeAllViews(); } int index = 0; final int NT = mTiles.size(); Loading @@ -107,10 +112,15 @@ public class PagedTileLayout extends ViewPager implements QSTileLayout { } @Override public void updateResources() { public boolean updateResources() { boolean changed = false; for (int i = 0; i < mPages.size(); i++) { mPages.get(i).updateResources(); changed |= mPages.get(i).updateResources(); } if (changed) { distributeTiles(); } return changed; } @Override Loading @@ -129,6 +139,13 @@ public class PagedTileLayout extends ViewPager implements QSTileLayout { setMeasuredDimension(getMeasuredWidth(), maxHeight + mPageIndicator.getMeasuredHeight()); } private final Runnable mDistribute = new Runnable() { @Override public void run() { distributeTiles(); } }; public static class TilePage extends TileLayout { private int mMaxRows = 3; Loading @@ -137,19 +154,17 @@ public class PagedTileLayout extends ViewPager implements QSTileLayout { updateResources(); } public void setMaxRows(int maxRows) { mMaxRows = maxRows; } @Override protected int getCellHeight() { return mContext.getResources().getDimensionPixelSize(R.dimen.qs_new_tile_height); public boolean updateResources() { if (super.updateResources()) { mMaxRows = mColumns != 3 ? 2 : 3; return true; } return false; } private void clear() { if (DEBUG) Log.d(TAG, "Clearing page"); removeAllViews(); mRecords.clear(); public void setMaxRows(int maxRows) { mMaxRows = maxRows; } public boolean isFull() { Loading Loading
packages/SystemUI/res/layout/qs_customize_layout.xml +0 −8 Original line number Diff line number Diff line Loading @@ -21,14 +21,6 @@ android:layout_height="wrap_content" android:orientation="vertical"> <com.android.systemui.qs.QuickTileLayout android:id="@+id/quick_tile_layout" android:layout_width="match_parent" android:layout_height="@dimen/qs_quick_actions_height" android:orientation="horizontal" android:paddingStart="@dimen/qs_quick_actions_padding" android:paddingEnd="@dimen/qs_quick_actions_padding" /> <view class="com.android.systemui.qs.PagedTileLayout$TilePage" android:id="@+id/tile_page" Loading
packages/SystemUI/res/values-land/config.xml +2 −0 Original line number Diff line number Diff line Loading @@ -38,4 +38,6 @@ while the stack is not focused. --> <item name="recents_layout_unfocused_range_min" format="float" type="integer">-2</item> <item name="recents_layout_unfocused_range_max" format="float" type="integer">1.5</item> <integer name="quick_settings_num_columns">4</integer> </resources>
packages/SystemUI/res/values-sw600dp-land/config.xml +2 −0 Original line number Diff line number Diff line Loading @@ -18,4 +18,6 @@ <!-- The maximum count of notifications on Keyguard. The rest will be collapsed in an overflow card. --> <integer name="keyguard_max_notification_count">3</integer> <integer name="quick_settings_num_columns">3</integer> </resources>
packages/SystemUI/res/values/dimens.xml +1 −3 Original line number Diff line number Diff line Loading @@ -134,9 +134,7 @@ <dimen name="pull_span_min">25dp</dimen> <dimen name="qs_tile_height">88dp</dimen> <dimen name="qs_new_tile_height">100dp</dimen> <dimen name="qs_quick_actions_height">88dp</dimen> <dimen name="qs_quick_actions_padding">25dp</dimen> <dimen name="qs_tile_margin">16dp</dimen> <dimen name="qs_quick_tile_size">48dp</dimen> <dimen name="qs_quick_tile_padding">12dp</dimen> <dimen name="qs_date_anim_translation">44.5dp</dimen> Loading
packages/SystemUI/src/com/android/systemui/qs/PagedTileLayout.java +31 −16 Original line number Diff line number Diff line Loading @@ -62,27 +62,32 @@ public class PagedTileLayout extends ViewPager implements QSTileLayout { @Override public int getOffsetTop(TileRecord tile) { return ((ViewGroup) tile.tileView.getParent()).getTop(); return ((ViewGroup) tile.tileView.getParent()).getTop() + getTop(); } @Override public void addTile(TileRecord tile) { mTiles.add(tile); distributeTiles(); postDistributeTiles(); } @Override public void removeTile(TileRecord tile) { if (mTiles.remove(tile)) { distributeTiles(); postDistributeTiles(); } } private void postDistributeTiles() { removeCallbacks(mDistribute); post(mDistribute); } private void distributeTiles() { if (DEBUG) Log.d(TAG, "Distributing tiles"); final int NP = mPages.size(); for (int i = 0; i < NP; i++) { mPages.get(i).clear(); mPages.get(i).removeAllViews(); } int index = 0; final int NT = mTiles.size(); Loading @@ -107,10 +112,15 @@ public class PagedTileLayout extends ViewPager implements QSTileLayout { } @Override public void updateResources() { public boolean updateResources() { boolean changed = false; for (int i = 0; i < mPages.size(); i++) { mPages.get(i).updateResources(); changed |= mPages.get(i).updateResources(); } if (changed) { distributeTiles(); } return changed; } @Override Loading @@ -129,6 +139,13 @@ public class PagedTileLayout extends ViewPager implements QSTileLayout { setMeasuredDimension(getMeasuredWidth(), maxHeight + mPageIndicator.getMeasuredHeight()); } private final Runnable mDistribute = new Runnable() { @Override public void run() { distributeTiles(); } }; public static class TilePage extends TileLayout { private int mMaxRows = 3; Loading @@ -137,19 +154,17 @@ public class PagedTileLayout extends ViewPager implements QSTileLayout { updateResources(); } public void setMaxRows(int maxRows) { mMaxRows = maxRows; } @Override protected int getCellHeight() { return mContext.getResources().getDimensionPixelSize(R.dimen.qs_new_tile_height); public boolean updateResources() { if (super.updateResources()) { mMaxRows = mColumns != 3 ? 2 : 3; return true; } return false; } private void clear() { if (DEBUG) Log.d(TAG, "Clearing page"); removeAllViews(); mRecords.clear(); public void setMaxRows(int maxRows) { mMaxRows = maxRows; } public boolean isFull() { Loading