Loading packages/SystemUI/res/drawable/qs_customizer_background.xml 0 → 100644 +19 −0 Original line number Diff line number Diff line <!-- Copyright (C) 2015 The Android Open Source Project Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <transition xmlns:android="http://schemas.android.com/apk/res/android"> <item android:drawable="@color/qs_detail_transition" /> <item android:drawable="?android:attr/windowBackground" /> </transition> packages/SystemUI/res/layout/qs_customize_panel.xml +7 −4 Original line number Diff line number Diff line Loading @@ -20,7 +20,8 @@ android:layout_height="match_parent" android:orientation="vertical" android:paddingBottom="@dimen/navigation_bar_size" android:background="?android:attr/windowBackground"> android:background="@drawable/qs_customizer_background" android:gravity="center_horizontal"> <FrameLayout android:layout_width="match_parent" Loading Loading @@ -76,10 +77,10 @@ </FrameLayout> <com.android.systemui.tuner.AutoScrollView android:layout_width="match_parent" android:layout_width="@dimen/notification_panel_width" android:layout_height="0dp" android:layout_weight="1" android:paddingTop="8dp" android:paddingTop="12dp" android:paddingBottom="8dp" android:elevation="2dp"> Loading @@ -87,7 +88,9 @@ android:id="@+id/quick_settings_panel" android:background="#0000" android:layout_width="match_parent" android:layout_height="wrap_content" /> android:layout_height="wrap_content" android:layout_marginLeft="@dimen/notification_side_padding" android:layout_marginRight="@dimen/notification_side_padding" /> </com.android.systemui.tuner.AutoScrollView> Loading packages/SystemUI/src/com/android/systemui/qs/PagedTileLayout.java +1 −0 Original line number Diff line number Diff line Loading @@ -181,6 +181,7 @@ public class PagedTileLayout extends ViewPager implements QSTileLayout { public TilePage(Context context, AttributeSet attrs) { super(context, attrs); mAllowDual = false; updateResources(); } public void setMaxRows(int maxRows) { Loading packages/SystemUI/src/com/android/systemui/qs/QSPanel.java +10 −4 Original line number Diff line number Diff line Loading @@ -172,7 +172,8 @@ public class QSPanel extends FrameLayout implements Tunable { mCustomizePanel.setHost(mHost); } else { if (mCustomizePanel != null && mCustomizePanel.isCustomizing()) { mCustomizePanel.hide(); mCustomizePanel.hide(mCustomizePanel.getWidth() / 2, mCustomizePanel.getHeight() / 2); } mCustomizePanel = null; } Loading Loading @@ -242,7 +243,7 @@ public class QSPanel extends FrameLayout implements Tunable { public void onCollapse() { if (mCustomizePanel != null && mCustomizePanel.isCustomizing()) { mCustomizePanel.hide(); mCustomizePanel.hide(mCustomizePanel.getWidth() / 2, mCustomizePanel.getHeight() / 2); } } Loading Loading @@ -382,7 +383,12 @@ public class QSPanel extends FrameLayout implements Tunable { public boolean onLongClick(View v) { if (mCustomizePanel != null) { if (!mCustomizePanel.isCustomizing()) { mCustomizePanel.show(); int[] loc = new int[2]; getLocationInWindow(loc); int x = r.tileView.getLeft() + r.tileView.getWidth() / 2 + loc[0]; int y = r.tileView.getTop() + mTileLayout.getOffsetTop(r) + r.tileView.getHeight() / 2 + loc[1]; mCustomizePanel.show(x, y); } } else { r.tile.longClick(); Loading @@ -409,7 +415,7 @@ public class QSPanel extends FrameLayout implements Tunable { public void closeDetail() { if (mCustomizePanel != null && mCustomizePanel.isCustomizing()) { // Treat this as a detail panel for now, to make things easy. mCustomizePanel.hide(); mCustomizePanel.hide(mCustomizePanel.getWidth() / 2, mCustomizePanel.getHeight() / 2); return; } showDetail(false, mDetailRecord); Loading packages/SystemUI/src/com/android/systemui/qs/TileLayout.java +4 −3 Original line number Diff line number Diff line Loading @@ -69,8 +69,9 @@ public class TileLayout extends ViewGroup implements QSTileLayout { final int columns = Math.max(1, res.getInteger(R.integer.quick_settings_num_columns)); mCellHeight = res.getDimensionPixelSize(R.dimen.qs_tile_height); mCellWidth = (int) (mCellHeight * TILE_ASPECT); mLargeCellHeight = res.getDimensionPixelSize(R.dimen.qs_dual_tile_height); mLargeCellWidth = (int)(mLargeCellHeight * TILE_ASPECT); mLargeCellHeight = mAllowDual ? res.getDimensionPixelSize(R.dimen.qs_dual_tile_height) : mCellHeight; mLargeCellWidth = mAllowDual ? (int) (mLargeCellHeight * TILE_ASPECT) : mCellWidth; mDualTileUnderlap = res.getDimensionPixelSize(R.dimen.qs_dual_tile_padding_vertical); if (mColumns != columns) { mColumns = columns; Loading Loading
packages/SystemUI/res/drawable/qs_customizer_background.xml 0 → 100644 +19 −0 Original line number Diff line number Diff line <!-- Copyright (C) 2015 The Android Open Source Project Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <transition xmlns:android="http://schemas.android.com/apk/res/android"> <item android:drawable="@color/qs_detail_transition" /> <item android:drawable="?android:attr/windowBackground" /> </transition>
packages/SystemUI/res/layout/qs_customize_panel.xml +7 −4 Original line number Diff line number Diff line Loading @@ -20,7 +20,8 @@ android:layout_height="match_parent" android:orientation="vertical" android:paddingBottom="@dimen/navigation_bar_size" android:background="?android:attr/windowBackground"> android:background="@drawable/qs_customizer_background" android:gravity="center_horizontal"> <FrameLayout android:layout_width="match_parent" Loading Loading @@ -76,10 +77,10 @@ </FrameLayout> <com.android.systemui.tuner.AutoScrollView android:layout_width="match_parent" android:layout_width="@dimen/notification_panel_width" android:layout_height="0dp" android:layout_weight="1" android:paddingTop="8dp" android:paddingTop="12dp" android:paddingBottom="8dp" android:elevation="2dp"> Loading @@ -87,7 +88,9 @@ android:id="@+id/quick_settings_panel" android:background="#0000" android:layout_width="match_parent" android:layout_height="wrap_content" /> android:layout_height="wrap_content" android:layout_marginLeft="@dimen/notification_side_padding" android:layout_marginRight="@dimen/notification_side_padding" /> </com.android.systemui.tuner.AutoScrollView> Loading
packages/SystemUI/src/com/android/systemui/qs/PagedTileLayout.java +1 −0 Original line number Diff line number Diff line Loading @@ -181,6 +181,7 @@ public class PagedTileLayout extends ViewPager implements QSTileLayout { public TilePage(Context context, AttributeSet attrs) { super(context, attrs); mAllowDual = false; updateResources(); } public void setMaxRows(int maxRows) { Loading
packages/SystemUI/src/com/android/systemui/qs/QSPanel.java +10 −4 Original line number Diff line number Diff line Loading @@ -172,7 +172,8 @@ public class QSPanel extends FrameLayout implements Tunable { mCustomizePanel.setHost(mHost); } else { if (mCustomizePanel != null && mCustomizePanel.isCustomizing()) { mCustomizePanel.hide(); mCustomizePanel.hide(mCustomizePanel.getWidth() / 2, mCustomizePanel.getHeight() / 2); } mCustomizePanel = null; } Loading Loading @@ -242,7 +243,7 @@ public class QSPanel extends FrameLayout implements Tunable { public void onCollapse() { if (mCustomizePanel != null && mCustomizePanel.isCustomizing()) { mCustomizePanel.hide(); mCustomizePanel.hide(mCustomizePanel.getWidth() / 2, mCustomizePanel.getHeight() / 2); } } Loading Loading @@ -382,7 +383,12 @@ public class QSPanel extends FrameLayout implements Tunable { public boolean onLongClick(View v) { if (mCustomizePanel != null) { if (!mCustomizePanel.isCustomizing()) { mCustomizePanel.show(); int[] loc = new int[2]; getLocationInWindow(loc); int x = r.tileView.getLeft() + r.tileView.getWidth() / 2 + loc[0]; int y = r.tileView.getTop() + mTileLayout.getOffsetTop(r) + r.tileView.getHeight() / 2 + loc[1]; mCustomizePanel.show(x, y); } } else { r.tile.longClick(); Loading @@ -409,7 +415,7 @@ public class QSPanel extends FrameLayout implements Tunable { public void closeDetail() { if (mCustomizePanel != null && mCustomizePanel.isCustomizing()) { // Treat this as a detail panel for now, to make things easy. mCustomizePanel.hide(); mCustomizePanel.hide(mCustomizePanel.getWidth() / 2, mCustomizePanel.getHeight() / 2); return; } showDetail(false, mDetailRecord); Loading
packages/SystemUI/src/com/android/systemui/qs/TileLayout.java +4 −3 Original line number Diff line number Diff line Loading @@ -69,8 +69,9 @@ public class TileLayout extends ViewGroup implements QSTileLayout { final int columns = Math.max(1, res.getInteger(R.integer.quick_settings_num_columns)); mCellHeight = res.getDimensionPixelSize(R.dimen.qs_tile_height); mCellWidth = (int) (mCellHeight * TILE_ASPECT); mLargeCellHeight = res.getDimensionPixelSize(R.dimen.qs_dual_tile_height); mLargeCellWidth = (int)(mLargeCellHeight * TILE_ASPECT); mLargeCellHeight = mAllowDual ? res.getDimensionPixelSize(R.dimen.qs_dual_tile_height) : mCellHeight; mLargeCellWidth = mAllowDual ? (int) (mLargeCellHeight * TILE_ASPECT) : mCellWidth; mDualTileUnderlap = res.getDimensionPixelSize(R.dimen.qs_dual_tile_padding_vertical); if (mColumns != columns) { mColumns = columns; Loading