Merge "Set QS edit overflow bg" into nyc-dev am: 18fafa4be7
am: 1b1480f27c
* commit '1b1480f27cdd28ea9ba7346bef88e318f6bb5a9a':
Set QS edit overflow bg
This commit is contained in:
@@ -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>
|
||||
|
||||
41
packages/SystemUI/res/layout/qs_customize_panel_content.xml
Normal file
41
packages/SystemUI/res/layout/qs_customize_panel_content.xml
Normal file
@@ -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>
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
LayoutInflater.from(getContext()).inflate(R.layout.qs_customize_panel_content, this);
|
||||
|
||||
public void setContainer(NotificationsQuickSettingsContainer notificationsQsContainer) {
|
||||
mNotifQsContainer = notificationsQsContainer;
|
||||
}
|
||||
|
||||
public void setQsContainer(QSContainer qsContainer) {
|
||||
mQsContainer = qsContainer;
|
||||
}
|
||||
|
||||
@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;
|
||||
|
||||
Reference in New Issue
Block a user