summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Sandler <dsandler@android.com>2011-09-13 00:11:42 -0400
committerDaniel Sandler <dsandler@android.com>2011-09-13 00:35:52 -0400
commit49f58407340a2282e0c0ff31043bee8937bd6bff (patch)
treeb7dddd8667abbe854b8999ad507b9ec2e31401bb
parentfe172cc861448cf1115195cbad5b3300357c02f0 (diff)
downloadframeworks_base-49f58407340a2282e0c0ff31043bee8937bd6bff.zip
frameworks_base-49f58407340a2282e0c0ff31043bee8937bd6bff.tar.gz
frameworks_base-49f58407340a2282e0c0ff31043bee8937bd6bff.tar.bz2
Transparent notification shade.
Bug: 5270161 (fix opacity) Bug: 5231194 (transparent shade) Change-Id: Ib7130ef0718c092dc9f8149698625a49d7abb2b2
-rw-r--r--packages/SystemUI/res/drawable/notification_list_shadow.xml26
-rw-r--r--packages/SystemUI/res/layout/status_bar_expanded.xml20
-rw-r--r--packages/SystemUI/res/layout/status_bar_tracking.xml2
-rw-r--r--packages/SystemUI/res/values/colors.xml3
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java2
5 files changed, 48 insertions, 5 deletions
diff --git a/packages/SystemUI/res/drawable/notification_list_shadow.xml b/packages/SystemUI/res/drawable/notification_list_shadow.xml
new file mode 100644
index 0000000..7f33153
--- /dev/null
+++ b/packages/SystemUI/res/drawable/notification_list_shadow.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2011 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.
+-->
+
+<shape
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ >
+ <gradient
+ android:angle="90"
+ android:endColor="@color/notification_list_shadow_top"
+ android:startColor="#00000000"
+ android:type="linear"
+ />
+</shape>
diff --git a/packages/SystemUI/res/layout/status_bar_expanded.xml b/packages/SystemUI/res/layout/status_bar_expanded.xml
index 0b3fb98..f9f31ca 100644
--- a/packages/SystemUI/res/layout/status_bar_expanded.xml
+++ b/packages/SystemUI/res/layout/status_bar_expanded.xml
@@ -32,6 +32,7 @@
android:paddingTop="3dp"
android:paddingBottom="5dp"
android:paddingRight="3dp"
+ android:background="@drawable/notification_header_bg"
>
<com.android.systemui.statusbar.policy.DateView android:id="@+id/date"
android:textAppearance="@style/TextAppearance.StatusBar.Clock"
@@ -104,12 +105,25 @@
android:fadingEdge="none"
android:overScrollMode="ifContentScrolls"
>
- <com.android.systemui.statusbar.policy.NotificationRowLayout
- android:id="@+id/latestItems"
+ <LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
- systemui:rowHeight="@dimen/notification_height"
+ android:orientation="vertical"
+ >
+ <com.android.systemui.statusbar.policy.NotificationRowLayout
+ android:id="@+id/latestItems"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ systemui:rowHeight="@dimen/notification_height"
+ android:background="@color/notification_list_shadow_top"
+ />
+ <ImageView
+ android:layout_width="match_parent"
+ android:layout_height="16dp"
+ android:src="@drawable/notification_list_shadow"
+ android:scaleType="fitXY"
/>
+ </LinearLayout>
</ScrollView>
<ImageView
diff --git a/packages/SystemUI/res/layout/status_bar_tracking.xml b/packages/SystemUI/res/layout/status_bar_tracking.xml
index 894248e..25c0237 100644
--- a/packages/SystemUI/res/layout/status_bar_tracking.xml
+++ b/packages/SystemUI/res/layout/status_bar_tracking.xml
@@ -30,7 +30,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
- android:background="@drawable/status_bar_bg"
+ android:background="@drawable/notification_tracking_bg"
/>
<com.android.systemui.statusbar.phone.CloseDragHandle android:id="@+id/close"
diff --git a/packages/SystemUI/res/values/colors.xml b/packages/SystemUI/res/values/colors.xml
index 670ee54..298536b4 100644
--- a/packages/SystemUI/res/values/colors.xml
+++ b/packages/SystemUI/res/values/colors.xml
@@ -25,4 +25,7 @@
<drawable name="status_bar_recents_app_thumbnail_background">#88000000</drawable>
<color name="status_bar_recents_app_label_color">#ffffffff</color>
<drawable name="status_bar_notification_row_background_color">#ff000000</drawable>
+ <drawable name="notification_header_bg">#FF000000</drawable>
+ <drawable name="notification_tracking_bg">#cc111315</drawable>
+ <color name="notification_list_shadow_top">#80000000</color>
</resources>
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
index b153613..0b65d01 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
@@ -1845,7 +1845,7 @@ public class PhoneStatusBar extends StatusBar {
| WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN
| WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS
| WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM,
- PixelFormat.OPAQUE);
+ PixelFormat.TRANSLUCENT);
if (ActivityManager.isHighEndGfx(mDisplay)) {
lp.flags |= WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED;
}