diff options
author | Joe Onorato <joeo@android.com> | 2010-09-26 13:02:01 -0700 |
---|---|---|
committer | Joe Onorato <joeo@android.com> | 2010-09-26 13:02:01 -0700 |
commit | 55d2d7646bf13bb5406bf01fd1bb96e58588570c (patch) | |
tree | 92da8833f1f735e3b16cbae534c980dddbd4f7ae /packages/SystemUI/res | |
parent | 81859bc3d4d18f558b903db1306e76d0db115cf6 (diff) | |
download | frameworks_base-55d2d7646bf13bb5406bf01fd1bb96e58588570c.zip frameworks_base-55d2d7646bf13bb5406bf01fd1bb96e58588570c.tar.gz frameworks_base-55d2d7646bf13bb5406bf01fd1bb96e58588570c.tar.bz2 |
Notification updates.
When the drawer is open, hide the icons & toasts.
Move Clear button to the bottom and add DND button.
Change-Id: I8b3253eb8f2ff3b1e11a819d58b202e023f00710
Diffstat (limited to 'packages/SystemUI/res')
7 files changed, 150 insertions, 29 deletions
diff --git a/packages/SystemUI/res/anim/notification_buttons_in.xml b/packages/SystemUI/res/anim/notification_buttons_in.xml new file mode 100644 index 0000000..630fd72 --- /dev/null +++ b/packages/SystemUI/res/anim/notification_buttons_in.xml @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2010 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. +--> + +<set xmlns:android="http://schemas.android.com/apk/res/android" + > + <alpha android:fromAlpha="0.0" android:toAlpha="1.0" + android:duration="@android:integer/config_longAnimTime" + /> +</set> diff --git a/packages/SystemUI/res/anim/notification_buttons_out.xml b/packages/SystemUI/res/anim/notification_buttons_out.xml new file mode 100644 index 0000000..4717e47 --- /dev/null +++ b/packages/SystemUI/res/anim/notification_buttons_out.xml @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2010 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. +--> + +<set xmlns:android="http://schemas.android.com/apk/res/android" + > + <alpha android:toAlpha="0.0" android:fromAlpha="1.0" + android:duration="@android:integer/config_longAnimTime" + /> +</set> diff --git a/packages/SystemUI/res/anim/notification_icons_in.xml b/packages/SystemUI/res/anim/notification_icons_in.xml new file mode 100644 index 0000000..630fd72 --- /dev/null +++ b/packages/SystemUI/res/anim/notification_icons_in.xml @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2010 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. +--> + +<set xmlns:android="http://schemas.android.com/apk/res/android" + > + <alpha android:fromAlpha="0.0" android:toAlpha="1.0" + android:duration="@android:integer/config_longAnimTime" + /> +</set> diff --git a/packages/SystemUI/res/anim/notification_icons_out.xml b/packages/SystemUI/res/anim/notification_icons_out.xml new file mode 100644 index 0000000..4717e47 --- /dev/null +++ b/packages/SystemUI/res/anim/notification_icons_out.xml @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2010 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. +--> + +<set xmlns:android="http://schemas.android.com/apk/res/android" + > + <alpha android:toAlpha="0.0" android:fromAlpha="1.0" + android:duration="@android:integer/config_longAnimTime" + /> +</set> diff --git a/packages/SystemUI/res/layout-xlarge/status_bar.xml b/packages/SystemUI/res/layout-xlarge/status_bar.xml index 958b5e7..5741a66 100644 --- a/packages/SystemUI/res/layout-xlarge/status_bar.xml +++ b/packages/SystemUI/res/layout-xlarge/status_bar.xml @@ -27,23 +27,64 @@ android:layout_height="match_parent" > - <com.android.systemui.statusbar.tablet.NotificationIconArea - android:id="@+id/notificationIcons" + <ImageView + class="com.android.systemui.statusbar.tablet.NotificationIconArea$MoreView" + android:id="@+id/expand" android:layout_width="wrap_content" - android:layout_height="match_parent" - android:layout_alignParentLeft="true" + android:layout_height="wrap_content" + android:src="@drawable/ic_sysbar_open" android:paddingLeft="6dip" + android:onClick="notificationIconsClicked" + /> + + <LinearLayout + android:id="@+id/notificationButtons" + android:layout_width="wrap_content" + android:layout_height="match_parent" + android:layout_toRightOf="@+id/expand" + android:layout_toLeftOf="@+id/systemInfo" android:gravity="center_vertical" android:orientation="horizontal" + android:visibility="gone" > - <ImageView - class="com.android.systemui.statusbar.tablet.NotificationIconArea$MoreView" - android:id="@+id/expand" + + <TextView android:id="@+id/do_not_disturb" + style="?android:attr/textAppearance" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:src="@drawable/ic_sysbar_open" - android:onClick="notificationIconsClicked" + android:layout_gravity="right|center_vertical" + android:layout_marginTop="2dip" + android:layout_marginBottom="1dip" + android:layout_marginRight="10dip" + android:padding="6dip" + android:textSize="14sp" + android:text="@string/status_bar_do_not_disturb_button" /> + + <TextView android:id="@+id/clear_all_button" + style="?android:attr/textAppearance" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="right|center_vertical" + android:layout_marginTop="2dip" + android:layout_marginBottom="1dip" + android:layout_marginRight="10dip" + android:padding="6dip" + android:textSize="14sp" + android:text="@string/status_bar_clear_all_button" + /> + + </LinearLayout> + + <com.android.systemui.statusbar.tablet.NotificationIconArea + android:id="@+id/notificationIcons" + android:layout_width="wrap_content" + android:layout_height="match_parent" + android:layout_toRightOf="@+id/expand" + android:layout_toLeftOf="@+id/systemInfo" + android:gravity="center_vertical" + android:orientation="horizontal" + > <view class="com.android.systemui.statusbar.tablet.NotificationIconArea$IconLayout" android:id="@+id/icons" @@ -59,7 +100,6 @@ android:background="@drawable/sysbar_hidenotification_handle" android:layout_marginLeft="8dip" /> - </com.android.systemui.statusbar.tablet.NotificationIconArea> <FrameLayout diff --git a/packages/SystemUI/res/layout-xlarge/sysbar_panel_notifications.xml b/packages/SystemUI/res/layout-xlarge/sysbar_panel_notifications.xml index 3489eec..2671e17 100644 --- a/packages/SystemUI/res/layout-xlarge/sysbar_panel_notifications.xml +++ b/packages/SystemUI/res/layout-xlarge/sysbar_panel_notifications.xml @@ -27,25 +27,6 @@ android:orientation="vertical" > - <TextView android:id="@+id/clear_all_button" - style="?android:attr/textAppearance" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_gravity="right|center_vertical" - android:layout_marginTop="2dip" - android:layout_marginBottom="1dip" - android:layout_marginRight="10dip" - android:padding="6dip" - android:textSize="14sp" - android:text="@string/status_bar_clear_all_button" - /> - - <View - android:layout_width="match_parent" - android:layout_height="1sp" - android:background="@android:drawable/divider_horizontal_dark" - /> - <ScrollView android:id="@+id/notificationScroller" android:layout_height="wrap_content" diff --git a/packages/SystemUI/res/values/strings.xml b/packages/SystemUI/res/values/strings.xml index 037dc4a..1f24ba6 100644 --- a/packages/SystemUI/res/values/strings.xml +++ b/packages/SystemUI/res/values/strings.xml @@ -24,6 +24,18 @@ all of the currently visible notifications. --> <string name="status_bar_clear_all_button">Clear</string> + <!-- The text for the button in the notification window-shade that turns + on do not disturb mode, where notifications no longer show their ticker, + no sound plays, and no icons are visible. The windowshade continues to show + the notifications. --> + <string name="status_bar_do_not_disturb_button">Do not disturb</string> + + <!-- The text for the button in the notification window-shade that turns + off do not disturb mode. After clicking this, notifications will be + shown again. --> + <string name="status_bar_please_disturb_button">Show notifications</string> + + <!-- The label in the bar at the top of the status bar when there are no notifications showing. --> <string name="status_bar_no_notifications_title">No notifications</string> |