am 60720a29: Merge "Notification & settings panel redesign." into honeycomb

* commit '60720a2991f424c867141b23062870e479ece80c':
  Notification & settings panel redesign.
This commit is contained in:
Daniel Sandler
2011-01-19 17:27:15 -08:00
committed by Android Git Automerger
20 changed files with 190 additions and 143 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 370 B

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 212 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 125 KiB

View File

@@ -0,0 +1,22 @@
<?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.
-->
<bitmap
xmlns:android="http://schemas.android.com/apk/res/android"
android:src="@drawable/notify_panel_bg_protect"
android:tileMode="repeat"
/>

View File

@@ -20,7 +20,6 @@
>
<item
android:drawable="@drawable/notification_item_background_color"
android:left="16dp"
/>
</layer-list>

View File

@@ -25,8 +25,8 @@
<View
android:id="@+id/scrim"
android:background="@drawable/notify_panel_bg_protect"
android:layout_width="match_parent"
android:background="@drawable/notify_panel_bg_protect_tiled"
android:layout_width="512dp"
android:layout_height="match_parent"
android:layout_alignParentTop="true"
android:layout_alignParentRight="true"
@@ -35,142 +35,27 @@
<RelativeLayout
android:id="@+id/content_parent"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_width="match_parent"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
>
<RelativeLayout
android:id="@+id/title_area"
android:layout_height="160dp"
android:layout_width="384dp"
android:layout_marginLeft="24dp"
android:paddingTop="20dp"
android:orientation="vertical"
<include layout="@layout/status_bar_notification_panel_title"
android:layout_width="471dp"
android:layout_height="465dp"
android:layout_alignParentTop="true"
android:layout_alignParentRight="true"
android:background="@drawable/panel_notification_tiled"
>
<com.android.systemui.statusbar.tablet.HoloClock
android:id="@+id/clock"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:layout_alignParentTop="true"
android:layout_marginRight="40dip"
android:layout_marginBottom="4dip"
>
<TextView android:id="@+id/time_bg"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="right"
android:singleLine="true"
android:textSize="90dip"
android:textColor="#999999" />
<TextView android:id="@+id/time_fg"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="right"
android:singleLine="true"
android:textSize="90dip"
android:textColor="#666666" />
</com.android.systemui.statusbar.tablet.HoloClock>
<com.android.systemui.statusbar.policy.DateView
android:id="@+id/date"
style="@style/StatusBarNotificationText"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:layout_below="@id/clock"
android:layout_marginTop="4dp"
android:layout_marginRight="48dp"
android:gravity="right"
/>
<ImageView
android:id="@+id/battery"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="@id/date"
android:layout_marginLeft="48dp"
android:layout_marginTop="18dp"
android:layout_marginRight="8dp"
android:baseline="15dp"
/>
<TextView
android:id="@+id/battery_text"
style="@style/StatusBarNotificationText"
android:layout_width="56dp"
android:layout_height="wrap_content"
android:layout_toRightOf="@id/battery"
android:layout_alignBaseline="@id/battery"
android:singleLine="true"
android:text="@string/status_bar_settings_settings_button"
/>
<ImageView
android:id="@+id/network_signal"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_toRightOf="@id/battery_text"
android:layout_alignBaseline="@id/battery"
android:layout_marginRight="8dp"
android:baseline="15dp"
/>
<ImageView
android:id="@+id/network_type"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_toRightOf="@id/battery_text"
android:layout_alignBaseline="@id/battery"
android:layout_marginRight="8dp"
android:baseline="15dp"
/>
<TextView
android:id="@+id/network_text"
style="@style/StatusBarNotificationText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toRightOf="@id/network_signal"
android:layout_alignBaseline="@id/battery"
android:singleLine="true"
android:text="@string/status_bar_settings_settings_button"
/>
<ImageView
android:id="@+id/settings_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="@id/battery"
android:layout_alignParentRight="true"
android:paddingRight="16dp"
android:src="@drawable/ic_notification_open"
android:baseline="21dp"
/>
<ImageView
android:id="@+id/notification_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignBaseline="@id/battery"
android:paddingRight="16dp"
android:visibility="invisible"
android:src="@drawable/status_bar_veto"
android:baseline="21dp"
/>
</RelativeLayout>
/>
<LinearLayout
android:id="@+id/content_frame"
android:background="@drawable/notify_panel_notify_bg"
android:layout_height="wrap_content"
android:layout_width="408dp"
android:layout_width="447dp"
android:orientation="vertical"
android:layout_below="@id/title_area"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:layout_marginTop="352dp"
>
<ScrollView
android:id="@+id/notification_scroller"
@@ -189,17 +74,9 @@
android:clickable="true"
android:focusable="true"
android:descendantFocusability="afterDescendants"
systemui:insetLeft="16dp"
>
</com.android.systemui.statusbar.tablet.NotificationLinearLayout>
</ScrollView>
<ImageView
android:id="@+id/notification_glow"
android:layout_width="match_parent"
android:layout_height="@dimen/status_bar_panel_bottom_offset"
android:layout_marginLeft="16dp"
android:src="@drawable/notify_item_glow_bottom"
/>
</LinearLayout>
</RelativeLayout>

View File

@@ -0,0 +1,153 @@
<!--
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.
-->
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui"
android:id="@+id/title_area"
android:layout_width="0dp"
android:layout_height="0dp"
android:orientation="vertical"
android:background="@drawable/notify_panel_clock_bg"
>
<ImageView
android:id="@+id/network_signal"
android:layout_height="32dp"
android:layout_width="32dp"
android:scaleType="centerInside"
android:layout_alignParentLeft="true"
android:layout_alignParentBottom="true"
android:baseline="22dp"
android:layout_marginLeft="32dp"
android:layout_marginTop="16dp"
android:layout_marginBottom="16dp"
/>
<ImageView
android:id="@+id/network_type"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_alignLeft="@id/network_signal"
android:layout_alignBottom="@id/network_signal"
android:layout_marginRight="8dp"
/>
<TextView
android:id="@+id/network_text"
style="@style/StatusBarNotificationText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toRightOf="@id/network_signal"
android:layout_marginRight="8dp"
android:layout_alignBaseline="@id/network_signal"
android:singleLine="true"
android:text="@string/status_bar_settings_settings_button"
/>
<ImageView
android:id="@+id/battery"
android:layout_height="32dp"
android:layout_width="32dp"
android:scaleType="centerInside"
android:layout_toRightOf="@id/network_text"
android:layout_alignBaseline="@id/network_signal"
android:baseline="22dp"
/>
<TextView
android:id="@+id/battery_text"
style="@style/StatusBarNotificationText"
android:layout_width="56dp"
android:layout_height="wrap_content"
android:layout_toRightOf="@id/battery"
android:layout_alignBaseline="@id/battery"
android:layout_marginRight="8dp"
android:singleLine="true"
android:text="@string/status_bar_settings_settings_button"
/>
<ImageView
android:id="@+id/settings_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="@id/battery"
android:layout_alignParentRight="true"
android:paddingRight="16dp"
android:src="@drawable/ic_notification_open"
android:baseline="21dp"
/>
<ImageView
android:id="@+id/notification_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignBaseline="@id/battery"
android:paddingRight="16dp"
android:visibility="invisible"
android:src="@drawable/status_bar_veto"
android:baseline="21dp"
/>
<View
android:id="@+id/title_divider"
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginLeft="32dp"
android:layout_alignParentRight="true"
android:layout_alignParentBottom="true"
android:layout_marginBottom="64dip"
android:background="@android:drawable/divider_horizontal_dark"
/>
<com.android.systemui.statusbar.tablet.HoloClock
android:id="@+id/clock"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:layout_alignParentRight="true"
android:layout_above="@id/title_divider"
android:layout_marginRight="32dip"
android:layout_marginBottom="8dip"
>
<TextView android:id="@+id/time_bg"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="right"
android:singleLine="true"
android:textSize="80sp"
android:textColor="#999999" />
<TextView android:id="@+id/time_fg"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="right"
android:singleLine="true"
android:textSize="80sp"
android:textColor="#666666" />
</com.android.systemui.statusbar.tablet.HoloClock>
<com.android.systemui.statusbar.policy.DateView
android:id="@+id/date"
style="@style/StatusBarNotificationText"
android:layout_height="wrap_content"
android:layout_width="142dp"
android:layout_alignBottom="@id/clock"
android:layout_alignParentLeft="true"
android:gravity="left"
android:layout_marginLeft="32dp"
/>
</RelativeLayout>

View File

@@ -32,7 +32,6 @@
android:layout_alignParentTop="true"
android:layout_toRightOf="@id/large_icon"
android:layout_toLeftOf="@id/veto"
android:layout_marginLeft="16dp"
android:focusable="true"
android:clickable="true"
/>
@@ -40,7 +39,6 @@
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginLeft="16dp"
android:layout_alignParentBottom="true"
android:background="@android:drawable/divider_horizontal_dark"
/>

View File

@@ -22,8 +22,7 @@
android:layout_height="wrap_content"
android:orientation="vertical"
android:background="@drawable/status_bar_item_background"
android:paddingLeft="16dp"
android:paddingRight="46dp"
android:paddingRight="48dp"
>
<!-- Airplane mode -->

View File

@@ -50,7 +50,6 @@ public class NotificationPanel extends RelativeLayout implements StatusBarPanel,
View mSettingsButton;
View mNotificationButton;
View mNotificationScroller;
View mNotificationGlow;
ViewGroup mContentFrame;
Rect mContentArea = new Rect();
View mSettingsView;
@@ -85,7 +84,6 @@ public class NotificationPanel extends RelativeLayout implements StatusBarPanel,
mNotificationButton = (ImageView)findViewById(R.id.notification_button);
mNotificationScroller = findViewById(R.id.notification_scroller);
mNotificationGlow = findViewById(R.id.notification_glow);
mContentFrame = (ViewGroup)findViewById(R.id.content_frame);
}
@@ -130,6 +128,7 @@ public class NotificationPanel extends RelativeLayout implements StatusBarPanel,
@Override
protected void onLayout(boolean changed, int l, int t, int r, int b) {
super.onLayout(changed, l, t, r, b);
mChoreo.setPanelHeight(mContentParent.getHeight());
}
@@ -182,7 +181,7 @@ public class NotificationPanel extends RelativeLayout implements StatusBarPanel,
void addSettingsView() {
LayoutInflater infl = LayoutInflater.from(getContext());
mSettingsView = infl.inflate(R.layout.status_bar_settings_view, mContentFrame, false);
mContentFrame.addView(mSettingsView, mContentFrame.indexOfChild(mNotificationGlow));
mContentFrame.addView(mSettingsView);
}
private class Choreographer implements Animator.AnimatorListener {