summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--packages/SystemUI/res/layout/qs_customize_panel.xml22
-rw-r--r--packages/SystemUI/res/layout/qs_customize_panel_content.xml41
-rw-r--r--packages/SystemUI/res/values/colors.xml3
-rw-r--r--packages/SystemUI/res/values/styles.xml4
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/customize/QSCustomizer.java33
5 files changed, 64 insertions, 39 deletions
diff --git a/packages/SystemUI/res/layout/qs_customize_panel.xml b/packages/SystemUI/res/layout/qs_customize_panel.xml
index 0491ea08525d..7af247ef1d2f 100644
--- a/packages/SystemUI/res/layout/qs_customize_panel.xml
+++ b/packages/SystemUI/res/layout/qs_customize_panel.xml
@@ -24,26 +24,4 @@
android:background="@drawable/qs_customizer_background"
android:gravity="center_horizontal">
- <Toolbar
- android:id="@*android:id/action_bar"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_marginTop="28dp"
- android:navigationContentDescription="@*android:string/action_bar_up_description"
- style="?android:attr/toolbarStyle" />
-
- <android.support.v7.widget.RecyclerView
- android:id="@android:id/list"
- android:layout_width="@dimen/notification_panel_width"
- android:layout_height="0dp"
- android:layout_weight="1"
- android:scrollIndicators="top"
- android:scrollbars="vertical" />
-
- <View
- android:layout_width="match_parent"
- android:layout_height="@dimen/navigation_bar_size"
- android:layout_gravity="bottom"
- android:background="#ff000000" />
-
</com.android.systemui.qs.customize.QSCustomizer>
diff --git a/packages/SystemUI/res/layout/qs_customize_panel_content.xml b/packages/SystemUI/res/layout/qs_customize_panel_content.xml
new file mode 100644
index 000000000000..75f8fa4ff45a
--- /dev/null
+++ b/packages/SystemUI/res/layout/qs_customize_panel_content.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2016 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.
+-->
+
+<merge xmlns:android="http://schemas.android.com/apk/res/android">
+
+ <Toolbar
+ android:id="@*android:id/action_bar"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginTop="28dp"
+ android:navigationContentDescription="@*android:string/action_bar_up_description"
+ style="?android:attr/toolbarStyle" />
+
+ <android.support.v7.widget.RecyclerView
+ android:id="@android:id/list"
+ android:layout_width="@dimen/notification_panel_width"
+ android:layout_height="0dp"
+ android:layout_weight="1"
+ android:scrollIndicators="top"
+ android:scrollbars="vertical" />
+
+ <View
+ android:layout_width="match_parent"
+ android:layout_height="@dimen/navigation_bar_size"
+ android:layout_gravity="bottom"
+ android:background="#ff000000" />
+</merge>
diff --git a/packages/SystemUI/res/values/colors.xml b/packages/SystemUI/res/values/colors.xml
index 30acc72abae5..d65ab04b110f 100644
--- a/packages/SystemUI/res/values/colors.xml
+++ b/packages/SystemUI/res/values/colors.xml
@@ -165,4 +165,7 @@
<!-- Keyboard shortcuts colors -->
<color name="ksh_system_group_color">#ff00bcd4</color>
<color name="ksh_application_group_color">#fff44336</color>
+
+ <!-- Background color of edit overflow -->
+ <color name="qs_edit_overflow_bg">#455A64</color>
</resources>
diff --git a/packages/SystemUI/res/values/styles.xml b/packages/SystemUI/res/values/styles.xml
index 89890d6d320d..2660926aa38b 100644
--- a/packages/SystemUI/res/values/styles.xml
+++ b/packages/SystemUI/res/values/styles.xml
@@ -339,4 +339,8 @@
<item name="android:colorAccent">@color/switch_accent_color</item>
</style>
+ <style name="edit_theme" parent="@android:style/Theme.Material">
+ <item name="android:colorBackground">@color/qs_edit_overflow_bg</item>
+ </style>
+
</resources>
diff --git a/packages/SystemUI/src/com/android/systemui/qs/customize/QSCustomizer.java b/packages/SystemUI/src/com/android/systemui/qs/customize/QSCustomizer.java
index 068efa6aaa37..72a59d7c16b1 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/customize/QSCustomizer.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/customize/QSCustomizer.java
@@ -25,6 +25,7 @@ import android.support.v7.widget.RecyclerView;
import android.util.AttributeSet;
import android.util.TypedValue;
import android.view.ContextThemeWrapper;
+import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
@@ -66,26 +67,11 @@ public class QSCustomizer extends LinearLayout implements OnMenuItemClickListene
private QSContainer mQsContainer;
public QSCustomizer(Context context, AttributeSet attrs) {
- super(new ContextThemeWrapper(context, android.R.style.Theme_Material), attrs);
+ super(new ContextThemeWrapper(context, R.style.edit_theme), attrs);
mClipper = new QSDetailClipper(this);
- }
-
- public void setHost(QSTileHost host) {
- mHost = host;
- mPhoneStatusBar = host.getPhoneStatusBar();
- }
-
- public void setContainer(NotificationsQuickSettingsContainer notificationsQsContainer) {
- mNotifQsContainer = notificationsQsContainer;
- }
- public void setQsContainer(QSContainer qsContainer) {
- mQsContainer = qsContainer;
- }
+ LayoutInflater.from(getContext()).inflate(R.layout.qs_customize_panel_content, this);
- @Override
- protected void onFinishInflate() {
- super.onFinishInflate();
mToolbar = (Toolbar) findViewById(com.android.internal.R.id.action_bar);
TypedValue value = new TypedValue();
mContext.getTheme().resolveAttribute(android.R.attr.homeAsUpIndicator, value, true);
@@ -115,6 +101,19 @@ public class QSCustomizer extends LinearLayout implements OnMenuItemClickListene
mRecyclerView.setItemAnimator(animator);
}
+ public void setHost(QSTileHost host) {
+ mHost = host;
+ mPhoneStatusBar = host.getPhoneStatusBar();
+ }
+
+ public void setContainer(NotificationsQuickSettingsContainer notificationsQsContainer) {
+ mNotifQsContainer = notificationsQsContainer;
+ }
+
+ public void setQsContainer(QSContainer qsContainer) {
+ mQsContainer = qsContainer;
+ }
+
public void show(int x, int y) {
if (!isShown) {
isShown = true;