summaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorJoe Onorato <joeo@google.com>2010-11-17 20:43:12 -0800
committerJoe Onorato <joeo@google.com>2010-11-17 23:14:57 -0800
commit4daaeafd278d22ec9013d1cdaade562044ee907e (patch)
tree9dcb03b4a67b3c26df109b95e9d52e71180a1d27 /packages
parente70b375c4b9d73d1165a21a421cfd73170cd06cc (diff)
downloadframeworks_base-4daaeafd278d22ec9013d1cdaade562044ee907e.zip
frameworks_base-4daaeafd278d22ec9013d1cdaade562044ee907e.tar.gz
frameworks_base-4daaeafd278d22ec9013d1cdaade562044ee907e.tar.bz2
Status bar formatting tweaks
Change-Id: Icb6c8d87e109d9e133e86b0fdb7bea12fe376d92
Diffstat (limited to 'packages')
-rw-r--r--packages/SystemUI/res/drawable/status_bar_item_background.xml26
-rw-r--r--packages/SystemUI/res/layout-xlarge/status_bar.xml24
-rw-r--r--packages/SystemUI/res/layout-xlarge/status_bar_latest_event.xml21
-rw-r--r--packages/SystemUI/res/layout-xlarge/sysbar_panel_notifications.xml10
-rw-r--r--packages/SystemUI/res/values/colors.xml1
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java10
6 files changed, 64 insertions, 28 deletions
diff --git a/packages/SystemUI/res/drawable/status_bar_item_background.xml b/packages/SystemUI/res/drawable/status_bar_item_background.xml
new file mode 100644
index 0000000..9da92a7
--- /dev/null
+++ b/packages/SystemUI/res/drawable/status_bar_item_background.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2006 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.
+-->
+
+<layer-list
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:opacity="translucent"
+ >
+ <item
+ android:drawable="@drawable/notification_item_background_color"
+ android:left="16dp"
+ />
+</layer-list>
+
diff --git a/packages/SystemUI/res/layout-xlarge/status_bar.xml b/packages/SystemUI/res/layout-xlarge/status_bar.xml
index ddb5bb9..b8b8bdd 100644
--- a/packages/SystemUI/res/layout-xlarge/status_bar.xml
+++ b/packages/SystemUI/res/layout-xlarge/status_bar.xml
@@ -28,18 +28,6 @@
android:animateLayoutChanges="false"
>
- <!-- ticker: transient incoming notification information -->
- <FrameLayout
- android:id="@+id/ticker"
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:layout_alignParentRight="true"
- android:layout_toRightOf="@+id/systemInfo"
- android:paddingLeft="6dip"
- android:gravity="center_vertical"
- android:animateLayoutChanges="true"
- />
-
<!-- notification icons & panel access -->
<LinearLayout
android:id="@+id/notificationArea"
@@ -242,5 +230,17 @@
android:visibility="gone"
/>
+ <!-- ticker: transient incoming notification information -->
+ <FrameLayout
+ android:id="@+id/ticker"
+ android:layout_width="wrap_content"
+ android:layout_height="match_parent"
+ android:layout_alignParentRight="true"
+ android:layout_toRightOf="@+id/systemInfo"
+ android:paddingLeft="6dip"
+ android:gravity="center_vertical"
+ android:animateLayoutChanges="true"
+ />
+
</RelativeLayout>
</com.android.systemui.statusbar.tablet.TabletStatusBarView>
diff --git a/packages/SystemUI/res/layout-xlarge/status_bar_latest_event.xml b/packages/SystemUI/res/layout-xlarge/status_bar_latest_event.xml
index 049a1cc..b6679a5 100644
--- a/packages/SystemUI/res/layout-xlarge/status_bar_latest_event.xml
+++ b/packages/SystemUI/res/layout-xlarge/status_bar_latest_event.xml
@@ -1,36 +1,35 @@
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
- android:layout_height="65sp"
- android:orientation="vertical"
- android:background="@android:drawable/status_bar_item_background"
+ android:layout_height="65dp"
+ android:background="@drawable/status_bar_item_background"
>
<ImageButton
android:id="@+id/veto"
- android:layout_width="wrap_content"
+ android:layout_width="48dp"
android:layout_height="match_parent"
android:layout_centerVertical="true"
android:layout_alignParentRight="true"
android:src="@drawable/status_bar_veto"
android:scaleType="center"
- android:background="@null"
- android:paddingLeft="16dip"
- android:paddingRight="16dip"
+ android:background="#ff000000"
/>
<com.android.systemui.statusbar.LatestItemView android:id="@+id/content"
+ android:layout_width="wrap_content"
+ android:layout_height="64sp"
android:layout_alignParentTop="true"
+ android:layout_alignParentLeft="true"
android:layout_toLeftOf="@id/veto"
- android:layout_width="match_parent"
- android:layout_height="64sp"
+ android:layout_marginLeft="16dp"
android:focusable="true"
android:clickable="true"
- android:paddingRight="6sp"
/>
<View
android:layout_width="match_parent"
- android:layout_height="1sp"
+ android:layout_height="1dp"
+ android:layout_marginLeft="16dp"
android:layout_alignParentBottom="true"
android:background="@android:drawable/divider_horizontal_dark"
/>
diff --git a/packages/SystemUI/res/layout-xlarge/sysbar_panel_notifications.xml b/packages/SystemUI/res/layout-xlarge/sysbar_panel_notifications.xml
index 287b46f..186aa64 100644
--- a/packages/SystemUI/res/layout-xlarge/sysbar_panel_notifications.xml
+++ b/packages/SystemUI/res/layout-xlarge/sysbar_panel_notifications.xml
@@ -22,10 +22,9 @@
<com.android.systemui.statusbar.tablet.NotificationPanel
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_height="match_parent"
- android:layout_width="wrap_content"
+ android:layout_width="540dp"
android:animateLayoutChanges="true"
android:background="@drawable/bg_scrim_notification"
- android:paddingLeft="140dp"
android:paddingBottom="32dp"
>
@@ -34,10 +33,11 @@
android:layout_height="wrap_content"
android:layout_width="384dp"
android:layout_above="@+id/content_frame"
- android:layout_marginLeft="16dp"
+ android:layout_marginLeft="24dp"
android:paddingBottom="16dp"
android:orientation="vertical"
android:animateLayoutChanges="true"
+ android:layout_alignParentRight="true"
>
<com.android.systemui.statusbar.policy.Clock
@@ -128,8 +128,9 @@
<FrameLayout
android:id="@+id/content_frame"
android:layout_height="wrap_content"
- android:layout_width="400dp"
+ android:layout_width="408dp"
android:layout_alignParentBottom="true"
+ android:layout_alignParentRight="true"
>
<ScrollView
android:id="@+id/notificationScroller"
@@ -144,7 +145,6 @@
android:animateLayoutChanges="true"
android:animationCache="false"
android:orientation="vertical"
- android:background="@drawable/status_bar_background"
android:clickable="true"
android:focusable="true"
android:descendantFocusability="afterDescendants"
diff --git a/packages/SystemUI/res/values/colors.xml b/packages/SystemUI/res/values/colors.xml
index a0def6b..fd2cf99 100644
--- a/packages/SystemUI/res/values/colors.xml
+++ b/packages/SystemUI/res/values/colors.xml
@@ -18,4 +18,5 @@
-->
<resources>
<drawable name="notification_number_text_color">#ffffffff</drawable>
+ <drawable name="notification_item_background_color">#ff000000</drawable>
</resources>
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java
index d290bd9..7c97ac7 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java
@@ -31,6 +31,8 @@ import android.content.Intent;
import android.content.res.Resources;
import android.graphics.PixelFormat;
import android.graphics.Rect;
+import android.graphics.drawable.Drawable;
+import android.graphics.drawable.LayerDrawable;
import android.os.Handler;
import android.os.IBinder;
import android.os.Message;
@@ -968,6 +970,13 @@ public class TabletStatusBar extends StatusBar {
}
}
+ void workAroundBadLayerDrawableOpacity(View v) {
+ LayerDrawable d = (LayerDrawable)v.getBackground();
+ v.setBackgroundDrawable(null);
+ d.setOpacity(PixelFormat.TRANSLUCENT);
+ v.setBackgroundDrawable(d);
+ }
+
private boolean inflateViews(NotificationData.Entry entry, ViewGroup parent) {
StatusBarNotification sbn = entry.notification;
RemoteViews remoteViews = sbn.notification.contentView;
@@ -979,6 +988,7 @@ public class TabletStatusBar extends StatusBar {
LayoutInflater inflater = (LayoutInflater)mContext.getSystemService(
Context.LAYOUT_INFLATER_SERVICE);
View row = inflater.inflate(R.layout.status_bar_latest_event, parent, false);
+ workAroundBadLayerDrawableOpacity(row);
View vetoButton = row.findViewById(R.id.veto);
if (entry.notification.isClearable()) {
final String _pkg = sbn.pkg;