summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--packages/SystemUI/res/drawable-hdpi/ic_notify_clear_normal.pngbin0 -> 531 bytes
-rw-r--r--packages/SystemUI/res/drawable-hdpi/ic_notify_clear_pressed.pngbin0 -> 532 bytes
-rw-r--r--packages/SystemUI/res/drawable-hdpi/notify_panel_clock_bg_normal.9.pngbin146692 -> 0 bytes
-rw-r--r--packages/SystemUI/res/drawable-hdpi/notify_panel_clock_bg_pressed.9.pngbin66264 -> 0 bytes
-rw-r--r--packages/SystemUI/res/drawable-hdpi/notify_panel_notify_bg.9.pngbin8894 -> 0 bytes
-rw-r--r--packages/SystemUI/res/drawable-hdpi/status_bar_ticker_tile.pngbin1011 -> 107 bytes
-rw-r--r--packages/SystemUI/res/drawable-hdpi/status_bar_veto_normal.pngbin157 -> 0 bytes
-rw-r--r--packages/SystemUI/res/drawable-hdpi/status_bar_veto_pressed.pngbin159 -> 0 bytes
-rw-r--r--packages/SystemUI/res/drawable-large-hdpi/notify_panel_clock_bg_normal.9.pngbin0 -> 69587 bytes
-rw-r--r--packages/SystemUI/res/drawable-large-hdpi/notify_panel_clock_bg_pressed.9.pngbin0 -> 66679 bytes
-rw-r--r--packages/SystemUI/res/drawable-large-hdpi/notify_panel_notify_bg.9.pngbin0 -> 3833 bytes
-rw-r--r--packages/SystemUI/res/drawable-large-mdpi/notify_panel_clock_bg_normal.9.pngbin0 -> 15567 bytes
-rw-r--r--packages/SystemUI/res/drawable-large-mdpi/notify_panel_clock_bg_pressed.9.pngbin0 -> 15548 bytes
-rw-r--r--packages/SystemUI/res/drawable-large-mdpi/notify_panel_notify_bg.9.pngbin0 -> 2211 bytes
-rw-r--r--packages/SystemUI/res/drawable-large-xhdpi/notify_panel_clock_bg_normal.9.pngbin0 -> 76630 bytes
-rw-r--r--packages/SystemUI/res/drawable-large-xhdpi/notify_panel_clock_bg_pressed.9.pngbin0 -> 72957 bytes
-rw-r--r--packages/SystemUI/res/drawable-large-xhdpi/notify_panel_notify_bg.9.pngbin0 -> 5958 bytes
-rw-r--r--packages/SystemUI/res/drawable-mdpi/ic_notify_clear_normal.pngbin0 -> 463 bytes
-rw-r--r--packages/SystemUI/res/drawable-mdpi/ic_notify_clear_pressed.pngbin0 -> 465 bytes
-rw-r--r--packages/SystemUI/res/drawable-mdpi/notify_panel_clock_bg_normal.9.pngbin39458 -> 0 bytes
-rw-r--r--packages/SystemUI/res/drawable-mdpi/notify_panel_clock_bg_pressed.9.pngbin42041 -> 0 bytes
-rw-r--r--packages/SystemUI/res/drawable-mdpi/notify_panel_notify_bg.9.pngbin3627 -> 0 bytes
-rw-r--r--packages/SystemUI/res/drawable-mdpi/status_bar_ticker_tile.pngbin212 -> 98 bytes
-rw-r--r--packages/SystemUI/res/drawable-mdpi/status_bar_veto_normal.pngbin157 -> 0 bytes
-rw-r--r--packages/SystemUI/res/drawable-mdpi/status_bar_veto_pressed.pngbin159 -> 0 bytes
-rw-r--r--packages/SystemUI/res/drawable-xhdpi/ic_notify_clear_normal.pngbin0 -> 722 bytes
-rw-r--r--packages/SystemUI/res/drawable-xhdpi/ic_notify_clear_pressed.pngbin0 -> 748 bytes
-rw-r--r--packages/SystemUI/res/drawable-xhdpi/status_bar_ticker_tile.pngbin0 -> 138 bytes
-rw-r--r--packages/SystemUI/res/drawable/ic_notify_clear.xml (renamed from packages/SystemUI/res/drawable/status_bar_veto.xml)8
-rw-r--r--packages/SystemUI/res/layout-sw600dp/status_bar.xml12
-rw-r--r--packages/SystemUI/res/layout-sw600dp/status_bar_notification_panel.xml11
-rw-r--r--packages/SystemUI/res/layout/status_bar_expanded.xml12
-rw-r--r--packages/SystemUI/res/layout/status_bar_notification_row.xml4
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java8
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/tablet/NotificationPanel.java46
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java22
36 files changed, 83 insertions, 40 deletions
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_notify_clear_normal.png b/packages/SystemUI/res/drawable-hdpi/ic_notify_clear_normal.png
new file mode 100644
index 000000000000..d17aae65043e
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/ic_notify_clear_normal.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_notify_clear_pressed.png b/packages/SystemUI/res/drawable-hdpi/ic_notify_clear_pressed.png
new file mode 100644
index 000000000000..5a89d76e771d
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/ic_notify_clear_pressed.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/notify_panel_clock_bg_normal.9.png b/packages/SystemUI/res/drawable-hdpi/notify_panel_clock_bg_normal.9.png
deleted file mode 100644
index b7ad39c5d1f6..000000000000
--- a/packages/SystemUI/res/drawable-hdpi/notify_panel_clock_bg_normal.9.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/notify_panel_clock_bg_pressed.9.png b/packages/SystemUI/res/drawable-hdpi/notify_panel_clock_bg_pressed.9.png
deleted file mode 100644
index c93bd8cf3269..000000000000
--- a/packages/SystemUI/res/drawable-hdpi/notify_panel_clock_bg_pressed.9.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/notify_panel_notify_bg.9.png b/packages/SystemUI/res/drawable-hdpi/notify_panel_notify_bg.9.png
deleted file mode 100644
index 1680887d30b2..000000000000
--- a/packages/SystemUI/res/drawable-hdpi/notify_panel_notify_bg.9.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/status_bar_ticker_tile.png b/packages/SystemUI/res/drawable-hdpi/status_bar_ticker_tile.png
index 772f77d034bb..3b826a9af08a 100644
--- a/packages/SystemUI/res/drawable-hdpi/status_bar_ticker_tile.png
+++ b/packages/SystemUI/res/drawable-hdpi/status_bar_ticker_tile.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/status_bar_veto_normal.png b/packages/SystemUI/res/drawable-hdpi/status_bar_veto_normal.png
deleted file mode 100644
index 90b4bafc5593..000000000000
--- a/packages/SystemUI/res/drawable-hdpi/status_bar_veto_normal.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/status_bar_veto_pressed.png b/packages/SystemUI/res/drawable-hdpi/status_bar_veto_pressed.png
deleted file mode 100644
index bc7034a231e8..000000000000
--- a/packages/SystemUI/res/drawable-hdpi/status_bar_veto_pressed.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-large-hdpi/notify_panel_clock_bg_normal.9.png b/packages/SystemUI/res/drawable-large-hdpi/notify_panel_clock_bg_normal.9.png
new file mode 100644
index 000000000000..002a663fd760
--- /dev/null
+++ b/packages/SystemUI/res/drawable-large-hdpi/notify_panel_clock_bg_normal.9.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-large-hdpi/notify_panel_clock_bg_pressed.9.png b/packages/SystemUI/res/drawable-large-hdpi/notify_panel_clock_bg_pressed.9.png
new file mode 100644
index 000000000000..399d62ea6be0
--- /dev/null
+++ b/packages/SystemUI/res/drawable-large-hdpi/notify_panel_clock_bg_pressed.9.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-large-hdpi/notify_panel_notify_bg.9.png b/packages/SystemUI/res/drawable-large-hdpi/notify_panel_notify_bg.9.png
new file mode 100644
index 000000000000..7385ecc93654
--- /dev/null
+++ b/packages/SystemUI/res/drawable-large-hdpi/notify_panel_notify_bg.9.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-large-mdpi/notify_panel_clock_bg_normal.9.png b/packages/SystemUI/res/drawable-large-mdpi/notify_panel_clock_bg_normal.9.png
new file mode 100644
index 000000000000..5a880e75037f
--- /dev/null
+++ b/packages/SystemUI/res/drawable-large-mdpi/notify_panel_clock_bg_normal.9.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-large-mdpi/notify_panel_clock_bg_pressed.9.png b/packages/SystemUI/res/drawable-large-mdpi/notify_panel_clock_bg_pressed.9.png
new file mode 100644
index 000000000000..489163d817d3
--- /dev/null
+++ b/packages/SystemUI/res/drawable-large-mdpi/notify_panel_clock_bg_pressed.9.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-large-mdpi/notify_panel_notify_bg.9.png b/packages/SystemUI/res/drawable-large-mdpi/notify_panel_notify_bg.9.png
new file mode 100644
index 000000000000..78900a13da7a
--- /dev/null
+++ b/packages/SystemUI/res/drawable-large-mdpi/notify_panel_notify_bg.9.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-large-xhdpi/notify_panel_clock_bg_normal.9.png b/packages/SystemUI/res/drawable-large-xhdpi/notify_panel_clock_bg_normal.9.png
new file mode 100644
index 000000000000..37e7791f23e0
--- /dev/null
+++ b/packages/SystemUI/res/drawable-large-xhdpi/notify_panel_clock_bg_normal.9.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-large-xhdpi/notify_panel_clock_bg_pressed.9.png b/packages/SystemUI/res/drawable-large-xhdpi/notify_panel_clock_bg_pressed.9.png
new file mode 100644
index 000000000000..66fa4a87d327
--- /dev/null
+++ b/packages/SystemUI/res/drawable-large-xhdpi/notify_panel_clock_bg_pressed.9.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-large-xhdpi/notify_panel_notify_bg.9.png b/packages/SystemUI/res/drawable-large-xhdpi/notify_panel_notify_bg.9.png
new file mode 100644
index 000000000000..11e36abf0760
--- /dev/null
+++ b/packages/SystemUI/res/drawable-large-xhdpi/notify_panel_notify_bg.9.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_notify_clear_normal.png b/packages/SystemUI/res/drawable-mdpi/ic_notify_clear_normal.png
new file mode 100644
index 000000000000..9490833b9a51
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/ic_notify_clear_normal.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_notify_clear_pressed.png b/packages/SystemUI/res/drawable-mdpi/ic_notify_clear_pressed.png
new file mode 100644
index 000000000000..0ff3efd057e9
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/ic_notify_clear_pressed.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/notify_panel_clock_bg_normal.9.png b/packages/SystemUI/res/drawable-mdpi/notify_panel_clock_bg_normal.9.png
deleted file mode 100644
index 2dcb6592ec06..000000000000
--- a/packages/SystemUI/res/drawable-mdpi/notify_panel_clock_bg_normal.9.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/notify_panel_clock_bg_pressed.9.png b/packages/SystemUI/res/drawable-mdpi/notify_panel_clock_bg_pressed.9.png
deleted file mode 100644
index e7ed68b156c9..000000000000
--- a/packages/SystemUI/res/drawable-mdpi/notify_panel_clock_bg_pressed.9.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/notify_panel_notify_bg.9.png b/packages/SystemUI/res/drawable-mdpi/notify_panel_notify_bg.9.png
deleted file mode 100644
index e346167e6939..000000000000
--- a/packages/SystemUI/res/drawable-mdpi/notify_panel_notify_bg.9.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/status_bar_ticker_tile.png b/packages/SystemUI/res/drawable-mdpi/status_bar_ticker_tile.png
index 0eb71d0d7923..999959802b48 100644
--- a/packages/SystemUI/res/drawable-mdpi/status_bar_ticker_tile.png
+++ b/packages/SystemUI/res/drawable-mdpi/status_bar_ticker_tile.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/status_bar_veto_normal.png b/packages/SystemUI/res/drawable-mdpi/status_bar_veto_normal.png
deleted file mode 100644
index 90b4bafc5593..000000000000
--- a/packages/SystemUI/res/drawable-mdpi/status_bar_veto_normal.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/status_bar_veto_pressed.png b/packages/SystemUI/res/drawable-mdpi/status_bar_veto_pressed.png
deleted file mode 100644
index bc7034a231e8..000000000000
--- a/packages/SystemUI/res/drawable-mdpi/status_bar_veto_pressed.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_notify_clear_normal.png b/packages/SystemUI/res/drawable-xhdpi/ic_notify_clear_normal.png
new file mode 100644
index 000000000000..645542345d2b
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/ic_notify_clear_normal.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_notify_clear_pressed.png b/packages/SystemUI/res/drawable-xhdpi/ic_notify_clear_pressed.png
new file mode 100644
index 000000000000..bfa8bb4f10df
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/ic_notify_clear_pressed.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/status_bar_ticker_tile.png b/packages/SystemUI/res/drawable-xhdpi/status_bar_ticker_tile.png
new file mode 100644
index 000000000000..6585ad66f01e
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/status_bar_ticker_tile.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable/status_bar_veto.xml b/packages/SystemUI/res/drawable/ic_notify_clear.xml
index 6e1b68155b49..9c432b299890 100644
--- a/packages/SystemUI/res/drawable/status_bar_veto.xml
+++ b/packages/SystemUI/res/drawable/ic_notify_clear.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2010 The Android Open Source Project
+<!-- 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.
@@ -15,7 +15,7 @@
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
- <item android:state_pressed="true" android:drawable="@drawable/status_bar_veto_pressed" />
- <item android:drawable="@drawable/status_bar_veto_normal" />
+ <item android:state_pressed="true"
+ android:drawable="@drawable/ic_notify_clear_pressed" />
+ <item android:drawable="@drawable/ic_notify_clear_normal" />
</selector>
-
diff --git a/packages/SystemUI/res/layout-sw600dp/status_bar.xml b/packages/SystemUI/res/layout-sw600dp/status_bar.xml
index a204f17bc6e0..55e57ab42d4e 100644
--- a/packages/SystemUI/res/layout-sw600dp/status_bar.xml
+++ b/packages/SystemUI/res/layout-sw600dp/status_bar.xml
@@ -35,6 +35,18 @@
android:clipChildren="false"
>
+ <ImageView android:id="@+id/clear_all_button"
+ android:layout_width="wrap_content"
+ android:layout_height="match_parent"
+ android:layout_alignParentRight="true"
+ android:layout_marginTop="1dp"
+ android:layout_marginRight="20dp"
+ android:paddingLeft="15dp"
+ android:paddingRight="15dp"
+ android:src="@drawable/ic_notify_clear"
+ android:visibility="invisible"
+ />
+
<!-- notification icons & panel access -->
<include layout="@layout/status_bar_notification_area"
android:layout_width="wrap_content"
diff --git a/packages/SystemUI/res/layout-sw600dp/status_bar_notification_panel.xml b/packages/SystemUI/res/layout-sw600dp/status_bar_notification_panel.xml
index 72519fb0e499..9f11e08b03e5 100644
--- a/packages/SystemUI/res/layout-sw600dp/status_bar_notification_panel.xml
+++ b/packages/SystemUI/res/layout-sw600dp/status_bar_notification_panel.xml
@@ -22,7 +22,6 @@
android:layout_height="match_parent"
android:layout_width="match_parent"
android:gravity="right"
- android:background="@drawable/notify_panel_bg_protect_tiled"
>
<RelativeLayout
@@ -31,12 +30,12 @@
android:layout_width="match_parent"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
- android:layout_marginBottom="-27dip"
+ android:layout_marginBottom="8dp"
>
<include layout="@layout/status_bar_notification_panel_title"
- android:layout_width="471dp"
- android:layout_height="465dp"
+ android:layout_width="478dp"
+ android:layout_height="224dp"
android:layout_alignParentTop="true"
android:layout_alignParentRight="true"
/>
@@ -45,11 +44,11 @@
android:id="@+id/content_frame"
android:background="@drawable/notify_panel_notify_bg"
android:layout_height="wrap_content"
- android:layout_width="447dp"
+ android:layout_width="478dp"
android:orientation="vertical"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
- android:layout_marginTop="352dp"
+ android:layout_marginTop="178dp"
>
<ScrollView
android:id="@+id/notification_scroller"
diff --git a/packages/SystemUI/res/layout/status_bar_expanded.xml b/packages/SystemUI/res/layout/status_bar_expanded.xml
index 26251124071e..0cfcae1b3194 100644
--- a/packages/SystemUI/res/layout/status_bar_expanded.xml
+++ b/packages/SystemUI/res/layout/status_bar_expanded.xml
@@ -47,19 +47,13 @@
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="?android:attr/textColorSecondary"
/>
- <TextView android:id="@+id/clear_all_button"
+ <ImageView android:id="@+id/clear_all_button"
android:layout_width="wrap_content"
- android:layout_height="wrap_content"
+ android:layout_height="match_parent"
android:layout_gravity="center_vertical"
- android:layout_marginTop="4dp"
- android:layout_marginBottom="1dp"
- android:textSize="14sp"
- android:textColor="#ff000000"
- android:text="@string/status_bar_clear_all_button"
- style="?android:attr/buttonStyle"
android:paddingLeft="15dp"
android:paddingRight="15dp"
- android:background="@drawable/btn_default_small"
+ android:src="@drawable/ic_notify_clear"
/>
</LinearLayout>
diff --git a/packages/SystemUI/res/layout/status_bar_notification_row.xml b/packages/SystemUI/res/layout/status_bar_notification_row.xml
index aff6a6e5afac..ca584abac052 100644
--- a/packages/SystemUI/res/layout/status_bar_notification_row.xml
+++ b/packages/SystemUI/res/layout/status_bar_notification_row.xml
@@ -3,15 +3,13 @@
android:layout_height="@dimen/notification_height"
>
- <ImageButton
+ <Button
android:id="@+id/veto"
android:layout_width="48dp"
android:layout_height="match_parent"
android:layout_centerVertical="true"
android:layout_alignParentRight="true"
android:layout_marginRight="-80dp"
- android:src="@drawable/status_bar_veto"
- android:scaleType="center"
android:background="@null"
android:paddingRight="8dp"
android:paddingLeft="8dp"
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 4239d2460ca9..18026f1a5f99 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
@@ -141,7 +141,7 @@ public class PhoneStatusBar extends StatusBar {
View mExpandedContents;
// top bar
TextView mNoNotificationsTitle;
- TextView mClearButton;
+ View mClearButton;
// drag bar
CloseDragHandle mCloseView;
@@ -301,7 +301,7 @@ public class PhoneStatusBar extends StatusBar {
mExpandedContents = expanded.findViewById(R.id.notificationLinearLayout);
mPile = (ViewGroup)expanded.findViewById(R.id.latestItems);
mNoNotificationsTitle = (TextView)expanded.findViewById(R.id.noNotificationsTitle);
- mClearButton = (TextView)expanded.findViewById(R.id.clear_all_button);
+ mClearButton = expanded.findViewById(R.id.clear_all_button);
mClearButton.setOnClickListener(mClearButtonListener);
mScrollView = (ScrollView)expanded.findViewById(R.id.scroll);
mNotificationLinearLayout = expanded.findViewById(R.id.notificationLinearLayout);
@@ -1984,7 +1984,9 @@ public class PhoneStatusBar extends StatusBar {
final Context context = mContext;
final Resources res = context.getResources();
- mClearButton.setText(context.getText(R.string.status_bar_clear_all_button));
+ if (mClearButton instanceof TextView) {
+ ((TextView)mClearButton).setText(context.getText(R.string.status_bar_clear_all_button));
+ }
mNoNotificationsTitle.setText(context.getText(R.string.status_bar_no_notifications_title));
loadDimens();
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/NotificationPanel.java b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/NotificationPanel.java
index a316e4b4b023..74dbfef37015 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/NotificationPanel.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/NotificationPanel.java
@@ -49,6 +49,7 @@ public class NotificationPanel extends RelativeLayout implements StatusBarPanel,
Rect mContentArea = new Rect();
View mSettingsView;
ViewGroup mContentParent;
+ TabletStatusBar mBar;
// amount to slide mContentParent down by when mContentFrame is missing
float mContentFrameMissingTranslation;
@@ -63,6 +64,10 @@ public class NotificationPanel extends RelativeLayout implements StatusBarPanel,
super(context, attrs, defStyle);
}
+ public void setBar(TabletStatusBar b) {
+ mBar = b;
+ }
+
@Override
public void onFinishInflate() {
super.onFinishInflate();
@@ -202,15 +207,16 @@ public class NotificationPanel extends RelativeLayout implements StatusBarPanel,
;
set.setDuration(200);
- if (!showing) {
- set.addListener(new AnimatorListenerAdapter() {
- @Override
- public void onAnimationEnd(Animator _a) {
+ set.addListener(new AnimatorListenerAdapter() {
+ @Override
+ public void onAnimationEnd(Animator _a) {
+ if (!showing) {
mContentFrame.setVisibility(View.GONE);
mContentFrame.setAlpha(1f);
}
- });
- }
+ updateClearButton();
+ }
+ });
set.start();
}
@@ -247,12 +253,23 @@ public class NotificationPanel extends RelativeLayout implements StatusBarPanel,
removeSettingsView();
}
}
+ updateClearButton();
updatePanelModeButtons();
}
});
a.start();
}
+ public void updateClearButton() {
+ if (mBar != null) {
+ final boolean showX
+ = (isShowing()
+ && mNotificationScroller.getVisibility() == View.VISIBLE
+ && mNotificationCount > 0);
+ mBar.getClearButton().setVisibility(showX ? View.VISIBLE : View.INVISIBLE);
+ }
+ }
+
public void updatePanelModeButtons() {
final boolean settingsVisible = (mSettingsView != null);
mSettingsButton.setVisibility(!settingsVisible ? View.VISIBLE : View.INVISIBLE);
@@ -294,11 +311,11 @@ public class NotificationPanel extends RelativeLayout implements StatusBarPanel,
AnimatorSet mContentAnim;
// should group this into a multi-property animation
- final static int OPEN_DURATION = 136;
- final static int CLOSE_DURATION = 250;
+ final static int OPEN_DURATION = 300;
+ final static int CLOSE_DURATION = 300;
// the panel will start to appear this many px from the end
- final int HYPERSPACE_OFFRAMP = 100;
+ final int HYPERSPACE_OFFRAMP = 200;
Choreographer() {
}
@@ -306,10 +323,6 @@ public class NotificationPanel extends RelativeLayout implements StatusBarPanel,
void createAnimation(boolean appearing) {
// mVisible: previous state; appearing: new state
- View root = findViewById(R.id.panel_root);
- Animator bgAnim = ObjectAnimator.ofInt(root.getBackground(), "alpha",
- mVisible ? 255 : 0, appearing ? 255 : 0);
-
float start, end;
// 0: on-screen
@@ -347,7 +360,6 @@ public class NotificationPanel extends RelativeLayout implements StatusBarPanel,
mContentAnim = new AnimatorSet();
mContentAnim
.play(fadeAnim)
- .with(bgAnim)
.with(posAnim)
;
mContentAnim.setDuration((DEBUG?10:1)*(appearing ? OPEN_DURATION : CLOSE_DURATION));
@@ -363,6 +375,9 @@ public class NotificationPanel extends RelativeLayout implements StatusBarPanel,
mContentAnim.start();
mVisible = appearing;
+
+ // we want to start disappearing promptly
+ if (!mVisible) updateClearButton();
}
public void onAnimationCancel(Animator animation) {
@@ -376,6 +391,9 @@ public class NotificationPanel extends RelativeLayout implements StatusBarPanel,
}
mContentParent.setLayerType(View.LAYER_TYPE_NONE, null);
mContentAnim = null;
+
+ // we want to show the X lazily
+ if (mVisible) updateClearButton();
}
public void onAnimationRepeat(Animator animation) {
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 c6e546e875b9..dc7e3137386c 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java
@@ -122,6 +122,7 @@ public class TabletStatusBar extends StatusBar implements
View mNotificationTrigger;
NotificationIconArea mNotificationIconArea;
ViewGroup mNavigationArea;
+ View mClearButton;
boolean mNotificationDNDMode;
NotificationData.Entry mNotificationDNDDummyEntry;
@@ -187,6 +188,7 @@ public class TabletStatusBar extends StatusBar implements
// Notification Panel
mNotificationPanel = (NotificationPanel)View.inflate(context,
R.layout.status_bar_notification_panel, null);
+ mNotificationPanel.setBar(this);
mNotificationPanel.show(false, false);
mNotificationPanel.setOnTouchListener(
new TouchOutsideListener(MSG_CLOSE_NOTIFICATION_PANEL, mNotificationPanel));
@@ -451,6 +453,10 @@ public class TabletStatusBar extends StatusBar implements
// the more notifications icon
mNotificationIconArea = (NotificationIconArea)sb.findViewById(R.id.notificationIcons);
+ // the "X" that appears in place of the clock when the panel is showing notifications
+ mClearButton = sb.findViewById(R.id.clear_all_button);
+ mClearButton.setOnClickListener(mClearButtonListener);
+
// where the icons go
mIconLayout = (NotificationIconArea.IconLayout) sb.findViewById(R.id.icons);
mIconLayout.setOnTouchListener(new NotificationIconTouchListener());
@@ -581,6 +587,21 @@ public class TabletStatusBar extends StatusBar implements
return sb;
}
+ private View.OnClickListener mClearButtonListener = new View.OnClickListener() {
+ public void onClick(View v) {
+ try {
+ mBarService.onClearAllNotifications();
+ } catch (RemoteException ex) {
+ // system process is dead if we're here.
+ }
+ animateCollapse();
+ }
+ };
+
+ public View getClearButton() {
+ return mClearButton;
+ }
+
public int getStatusBarHeight() {
return mHeightReceiver.getHeight();
}
@@ -1183,7 +1204,6 @@ public class TabletStatusBar extends StatusBar implements
}
private void setAreThereNotifications() {
- final boolean hasClearable = mNotificationData.hasClearableItems();
}
/**