Skip to content

Commit 52d2742

Browse files
dsandlerAndroid (Google) Code Review
authored andcommitted
Merge "Transparent notification shade."
2 parents bf208ec + 49f5840 commit 52d2742

File tree

5 files changed

+48
-5
lines changed

5 files changed

+48
-5
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!-- Copyright (C) 2011 The Android Open Source Project
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
-->
16+
17+
<shape
18+
xmlns:android="http://schemas.android.com/apk/res/android"
19+
>
20+
<gradient
21+
android:angle="90"
22+
android:endColor="@color/notification_list_shadow_top"
23+
android:startColor="#00000000"
24+
android:type="linear"
25+
/>
26+
</shape>

packages/SystemUI/res/layout/status_bar_expanded.xml

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
android:paddingTop="3dp"
3333
android:paddingBottom="5dp"
3434
android:paddingRight="3dp"
35+
android:background="@drawable/notification_header_bg"
3536
>
3637
<com.android.systemui.statusbar.policy.DateView android:id="@+id/date"
3738
android:textAppearance="@style/TextAppearance.StatusBar.Clock"
@@ -104,12 +105,25 @@
104105
android:fadingEdge="none"
105106
android:overScrollMode="ifContentScrolls"
106107
>
107-
<com.android.systemui.statusbar.policy.NotificationRowLayout
108-
android:id="@+id/latestItems"
108+
<LinearLayout
109109
android:layout_width="match_parent"
110110
android:layout_height="wrap_content"
111-
systemui:rowHeight="@dimen/notification_height"
111+
android:orientation="vertical"
112+
>
113+
<com.android.systemui.statusbar.policy.NotificationRowLayout
114+
android:id="@+id/latestItems"
115+
android:layout_width="match_parent"
116+
android:layout_height="wrap_content"
117+
systemui:rowHeight="@dimen/notification_height"
118+
android:background="@color/notification_list_shadow_top"
119+
/>
120+
<ImageView
121+
android:layout_width="match_parent"
122+
android:layout_height="16dp"
123+
android:src="@drawable/notification_list_shadow"
124+
android:scaleType="fitXY"
112125
/>
126+
</LinearLayout>
113127
</ScrollView>
114128

115129
<ImageView

packages/SystemUI/res/layout/status_bar_tracking.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
android:layout_width="match_parent"
3131
android:layout_height="wrap_content"
3232
android:layout_weight="1"
33-
android:background="@drawable/status_bar_bg"
33+
android:background="@drawable/notification_tracking_bg"
3434
/>
3535

3636
<com.android.systemui.statusbar.phone.CloseDragHandle android:id="@+id/close"

packages/SystemUI/res/values/colors.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,7 @@
2525
<drawable name="status_bar_recents_app_thumbnail_background">#88000000</drawable>
2626
<color name="status_bar_recents_app_label_color">#ffffffff</color>
2727
<drawable name="status_bar_notification_row_background_color">#ff000000</drawable>
28+
<drawable name="notification_header_bg">#FF000000</drawable>
29+
<drawable name="notification_tracking_bg">#cc111315</drawable>
30+
<color name="notification_list_shadow_top">#80000000</color>
2831
</resources>

packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1845,7 +1845,7 @@ void onBarViewAttached() {
18451845
| WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN
18461846
| WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS
18471847
| WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM,
1848-
PixelFormat.OPAQUE);
1848+
PixelFormat.TRANSLUCENT);
18491849
if (ActivityManager.isHighEndGfx(mDisplay)) {
18501850
lp.flags |= WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED;
18511851
}

0 commit comments

Comments
 (0)