Merge "More visual refresh in the phone notification panel." into jb-dev
BIN
packages/SystemUI/res/drawable-hdpi/notification_panel_bg.9.png
Normal file
|
After Width: | Height: | Size: 232 B |
BIN
packages/SystemUI/res/drawable-hdpi/status_bar_close_off.9.png
Normal file
|
After Width: | Height: | Size: 716 B |
|
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 712 B |
BIN
packages/SystemUI/res/drawable-mdpi/notification_panel_bg.9.png
Normal file
|
After Width: | Height: | Size: 211 B |
BIN
packages/SystemUI/res/drawable-mdpi/status_bar_close_off.9.png
Normal file
|
After Width: | Height: | Size: 414 B |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 532 B |
|
After Width: | Height: | Size: 2.6 KiB |
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 3.9 KiB |
|
After Width: | Height: | Size: 2.6 KiB |
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 3.9 KiB |
BIN
packages/SystemUI/res/drawable-xhdpi/notification_panel_bg.9.png
Normal file
|
After Width: | Height: | Size: 249 B |
BIN
packages/SystemUI/res/drawable-xhdpi/status_bar_close_off.9.png
Normal file
|
After Width: | Height: | Size: 822 B |
|
Before Width: | Height: | Size: 5.0 KiB After Width: | Height: | Size: 1001 B |
@@ -14,14 +14,23 @@
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_checked="true"
|
||||
android:drawable="@drawable/ic_notify_rotation_on_normal" />
|
||||
<item android:state_checked="true" android:state_pressed="true"
|
||||
android:drawable="@drawable/ic_notify_rotation_on_pressed" />
|
||||
<item android:state_pressed="true"
|
||||
android:drawable="@drawable/ic_notify_rotation_off_pressed" />
|
||||
<item
|
||||
android:drawable="@drawable/ic_notify_rotation_off_normal" />
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:constantSize="true">
|
||||
<item android:state_checked="true" android:state_pressed="true">
|
||||
<bitmap android:src="@drawable/ic_notify_rotation_on_pressed"
|
||||
android:gravity="center" />
|
||||
</item>
|
||||
<item android:state_checked="true">
|
||||
<bitmap android:src="@drawable/ic_notify_rotation_on_normal"
|
||||
android:gravity="center" />
|
||||
</item>
|
||||
<item android:state_pressed="true">
|
||||
<bitmap android:src="@drawable/ic_notify_rotation_off_pressed"
|
||||
android:gravity="center" />
|
||||
</item>
|
||||
<item>
|
||||
<bitmap android:src="@drawable/ic_notify_rotation_off_normal"
|
||||
android:gravity="center" />
|
||||
</item>
|
||||
</selector>
|
||||
|
||||
|
||||
23
packages/SystemUI/res/drawable/status_bar_close.xml
Normal file
@@ -0,0 +1,23 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 2012 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.
|
||||
-->
|
||||
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_pressed="true"
|
||||
android:drawable="@drawable/status_bar_close_on" />
|
||||
<item
|
||||
android:drawable="@drawable/status_bar_close_off" />
|
||||
</selector>
|
||||
|
||||
@@ -25,25 +25,24 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:background="@drawable/notification_tracking_bg"
|
||||
android:paddingTop="@*android:dimen/status_bar_height"
|
||||
android:background="@drawable/notification_panel_bg"
|
||||
android:paddingTop="@dimen/notification_panel_padding_top"
|
||||
android:layout_marginLeft="@dimen/notification_panel_margin_left"
|
||||
>
|
||||
|
||||
<RelativeLayout
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="52dp"
|
||||
android:paddingTop="3dp"
|
||||
android:paddingBottom="5dp"
|
||||
android:paddingRight="3dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="@dimen/notification_panel_header_padding_top"
|
||||
android:background="@drawable/notification_header_bg"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:baselineAligned="false"
|
||||
>
|
||||
<com.android.systemui.statusbar.policy.Clock
|
||||
android:id="@+id/clock"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:singleLine="true"
|
||||
android:textAppearance="@style/TextAppearance.StatusBar.Expanded.Clock"
|
||||
@@ -52,64 +51,41 @@
|
||||
<com.android.systemui.statusbar.policy.DateView android:id="@+id/date"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_toRightOf="@id/clock"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:paddingLeft="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:textAppearance="@style/TextAppearance.StatusBar.Expanded.Date"
|
||||
/>
|
||||
<!--
|
||||
<com.android.systemui.statusbar.phone.CarrierLabel
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginTop="1dp"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:paddingBottom="1dp"
|
||||
android:paddingLeft="4dp"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
/>
|
||||
-->
|
||||
|
||||
<com.android.systemui.statusbar.RotationToggle android:id="@+id/rotation_lock_button"
|
||||
android:layout_width="32dp"
|
||||
android:layout_height="32dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_toRightOf="@id/date"
|
||||
android:layout_marginLeft="12dp"
|
||||
android:layout_margin="8dp"
|
||||
android:button="@drawable/ic_notify_rotation"
|
||||
android:contentDescription="@string/accessibility_rotation_lock_off"
|
||||
/>
|
||||
|
||||
<ImageView android:id="@+id/settings_button"
|
||||
android:layout_width="32dp"
|
||||
android:layout_height="32dp"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_toRightOf="@id/rotation_lock_button"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:scaleType="center"
|
||||
android:src="@drawable/ic_notify_quicksettings"
|
||||
android:contentDescription="@string/accessibility_settings_button"
|
||||
/>
|
||||
|
||||
<Space
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
/>
|
||||
|
||||
<ImageView android:id="@+id/clear_all_button"
|
||||
android:layout_width="32dp"
|
||||
android:layout_height="32dp"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:scaleType="center"
|
||||
android:src="@drawable/ic_notify_clear"
|
||||
android:contentDescription="@string/accessibility_clear_all"
|
||||
/>
|
||||
</RelativeLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="2dp"
|
||||
android:layout_marginTop="52dp"
|
||||
android:background="@drawable/status_bar_hr"
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
<ScrollView
|
||||
android:id="@+id/scroll"
|
||||
@@ -117,8 +93,8 @@
|
||||
android:layout_height="match_parent"
|
||||
android:fadingEdge="none"
|
||||
android:overScrollMode="ifContentScrolls"
|
||||
android:layout_marginTop="54dp"
|
||||
android:layout_marginBottom="34dp"
|
||||
android:layout_marginTop="@dimen/notification_panel_header_height"
|
||||
android:layout_marginBottom="@dimen/close_handle_underlap"
|
||||
>
|
||||
<com.android.systemui.statusbar.policy.NotificationRowLayout
|
||||
android:id="@+id/latestItems"
|
||||
@@ -128,14 +104,6 @@
|
||||
/>
|
||||
</ScrollView>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/title_bar_shadow"
|
||||
android:layout_marginTop="54dp"
|
||||
android:scaleType="fitXY"
|
||||
/>
|
||||
|
||||
<com.android.systemui.statusbar.phone.CloseDragHandle android:id="@+id/close"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/close_handle_height"
|
||||
@@ -144,10 +112,10 @@
|
||||
>
|
||||
<ImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="34dp"
|
||||
android:layout_height="@dimen/close_handle_height"
|
||||
android:layout_gravity="bottom"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/status_bar_close_on"
|
||||
android:src="@drawable/status_bar_close"
|
||||
/>
|
||||
|
||||
</com.android.systemui.statusbar.phone.CloseDragHandle>
|
||||
|
||||
@@ -1,60 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright (C) 2008 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.
|
||||
-->
|
||||
|
||||
<com.android.systemui.statusbar.phone.TrackingView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="vertical"
|
||||
android:visibility="gone"
|
||||
android:focusable="true"
|
||||
android:descendantFocusability="afterDescendants"
|
||||
android:paddingBottom="0px"
|
||||
android:paddingLeft="0px"
|
||||
android:paddingRight="0px"
|
||||
>
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/notification_tracking_bg"
|
||||
>
|
||||
<com.android.systemui.statusbar.phone.CarrierLabel
|
||||
android:textAppearance="@style/TextAppearance.StatusBar.Clock"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_gravity="bottom"
|
||||
android:gravity="center"
|
||||
android:paddingBottom="20dp"
|
||||
/>
|
||||
</FrameLayout>
|
||||
|
||||
<com.android.systemui.statusbar.phone.CloseDragHandle android:id="@+id/close"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
>
|
||||
<ImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/status_bar_close_on"
|
||||
/>
|
||||
|
||||
</com.android.systemui.statusbar.phone.CloseDragHandle>
|
||||
|
||||
</com.android.systemui.statusbar.phone.TrackingView>
|
||||
@@ -16,8 +16,8 @@
|
||||
*/
|
||||
-->
|
||||
<resources>
|
||||
<!-- The width of the notification panel window -->
|
||||
<dimen name="notification_panel_width">446dp</dimen>
|
||||
<!-- The width of the notification panel window: 446 + 16 + 16 (padding in the bg drawable) -->
|
||||
<dimen name="notification_panel_width">478dp</dimen>
|
||||
|
||||
<!-- Layout parameters for the notification panel -->
|
||||
<dimen name="notification_panel_margin_bottom">192dp</dimen>
|
||||
@@ -36,4 +36,7 @@
|
||||
<!-- Height of search panel including navigation bar height -->
|
||||
<dimen name="navbar_search_panel_height">300dip</dimen>
|
||||
|
||||
<!-- Extra space above the clock in the panel; on this device, zero -->
|
||||
<dimen name="notification_panel_header_padding_top">0dp</dimen>
|
||||
|
||||
</resources>
|
||||
|
||||
@@ -25,7 +25,6 @@
|
||||
<color name="status_bar_recents_app_label_color">#ffffffff</color>
|
||||
<drawable name="status_bar_notification_row_background_color">#ff090909</drawable>
|
||||
<drawable name="notification_header_bg">#FF000000</drawable>
|
||||
<drawable name="notification_tracking_bg">#66000000</drawable>
|
||||
<color name="notification_list_shadow_top">#80000000</color>
|
||||
<drawable name="recents_callout_line">#99ffffff</drawable>
|
||||
<drawable name="notification_item_background_legacy_color">#ffaaaaaa</drawable>
|
||||
|
||||
@@ -125,7 +125,19 @@
|
||||
<dimen name="navbar_search_panel_height">230dip</dimen>
|
||||
|
||||
<!-- Height of the draggable handle at the bottom of the phone notification panel -->
|
||||
<dimen name="close_handle_height">34dp</dimen>
|
||||
<dimen name="close_handle_height">32dp</dimen>
|
||||
|
||||
<!-- Amount of close_handle that will not overlap the notification list -->
|
||||
<dimen name="close_handle_underlap">18dp</dimen>
|
||||
|
||||
<!-- Height of the notification panel header bar -->
|
||||
<dimen name="notification_panel_header_height">48dp</dimen>
|
||||
|
||||
<!-- Height of the notification panel header bar -->
|
||||
<dimen name="notification_panel_padding_top">@*android:dimen/status_bar_height</dimen>
|
||||
|
||||
<!-- Extra space above the clock in the panel; half of (notification_panel_header_height - 32) -->
|
||||
<dimen name="notification_panel_header_padding_top">0dp</dimen>
|
||||
|
||||
<!-- Layout parameters for the notification panel -->
|
||||
<dimen name="notification_panel_margin_bottom">0dp</dimen>
|
||||
|
||||
@@ -106,6 +106,7 @@ public class PhoneStatusBar extends BaseStatusBar {
|
||||
= "com.android.internal.policy.statusbar.START";
|
||||
|
||||
private static final boolean ENABLE_INTRUDERS = false;
|
||||
private static final boolean DIM_BEHIND_EXPANDED_PANEL = false;
|
||||
|
||||
static final int EXPANDED_LEAVE_ALONE = -10000;
|
||||
static final int EXPANDED_FULL_OPEN = -10001;
|
||||
@@ -1333,6 +1334,7 @@ public class PhoneStatusBar extends BaseStatusBar {
|
||||
mPile.setLayerType(View.LAYER_TYPE_NONE, null);
|
||||
mVelocityTracker.recycle();
|
||||
mVelocityTracker = null;
|
||||
mCloseView.setPressed(false);
|
||||
}
|
||||
|
||||
void incrementAnim(long frameTimeNanos) {
|
||||
@@ -1371,6 +1373,8 @@ public class PhoneStatusBar extends BaseStatusBar {
|
||||
Slog.d(TAG, "panel: beginning to track the user's touch, y=" + y + " opening=" + opening);
|
||||
}
|
||||
|
||||
mCloseView.setPressed(true);
|
||||
|
||||
mTracking = true;
|
||||
mPile.setLayerType(View.LAYER_TYPE_HARDWARE, null);
|
||||
mVelocityTracker = VelocityTracker.obtain();
|
||||
@@ -1497,8 +1501,8 @@ public class PhoneStatusBar extends BaseStatusBar {
|
||||
if (!mExpanded) {
|
||||
mViewDelta = statusBarSize - y;
|
||||
} else {
|
||||
// mCloseView.getLocationOnScreen(mAbsPos)...?
|
||||
// mViewDelta = mAbsPos[1] + mTrackingView.getHeight() - y;
|
||||
mCloseView.getLocationOnScreen(mAbsPos);
|
||||
mViewDelta = mAbsPos[1] + statusBarSize + getCloseViewHeight() - y; // XXX: not closeViewHeight, but paddingBottom from the 9patch
|
||||
}
|
||||
if ((!mExpanded && y < hitSize) ||
|
||||
// @@ add taps outside the panel if it's not full-screen
|
||||
@@ -2011,7 +2015,7 @@ public class PhoneStatusBar extends BaseStatusBar {
|
||||
}
|
||||
mNotificationPanel.setLayoutParams(lp);
|
||||
|
||||
if (ActivityManager.isHighEndGfx(mDisplay)) {
|
||||
if (DIM_BEHIND_EXPANDED_PANEL && ActivityManager.isHighEndGfx(mDisplay)) {
|
||||
// woo, special effects
|
||||
final int barh = getCloseViewHeight() + getStatusBarHeight();
|
||||
final float frac = saturate((float)(panelh - barh) / (disph - barh));
|
||||
|
||||