Merge "Visual refresh of notification panel header." into jb-dev
Before Width: | Height: | Size: 799 B After Width: | Height: | Size: 577 B |
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 916 B |
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 698 B After Width: | Height: | Size: 546 B |
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 791 B |
Before Width: | Height: | Size: 894 B After Width: | Height: | Size: 739 B |
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 582 B |
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 2.3 KiB |
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 3.2 KiB |
After Width: | Height: | Size: 2.3 KiB |
After Width: | Height: | Size: 3.7 KiB |
@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 2011 The Android Open Source Project
|
||||
<!-- 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.
|
||||
@ -16,6 +16,8 @@
|
||||
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_pressed="true"
|
||||
android:drawable="@drawable/ic_notify_quicksettings_pressed" />
|
||||
<item android:drawable="@drawable/ic_notify_quicksettings_normal" />
|
||||
android:drawable="@drawable/ic_notify_quicksettings_pressed" />
|
||||
<item
|
||||
android:drawable="@drawable/ic_notify_quicksettings_normal" />
|
||||
</selector>
|
||||
|
||||
|
27
packages/SystemUI/res/drawable/ic_notify_rotation.xml
Normal file
@ -0,0 +1,27 @@
|
||||
<?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_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>
|
||||
|
@ -38,14 +38,25 @@
|
||||
android:paddingRight="3dp"
|
||||
android:background="@drawable/notification_header_bg"
|
||||
>
|
||||
<com.android.systemui.statusbar.policy.DateView android:id="@+id/date"
|
||||
android:textAppearance="@style/TextAppearance.StatusBar.Date"
|
||||
<com.android.systemui.statusbar.policy.Clock
|
||||
android:id="@+id/clock"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:singleLine="true"
|
||||
android:gravity="center_vertical|left"
|
||||
android:paddingLeft="16dp"
|
||||
android:textAppearance="@style/TextAppearance.StatusBar.Expanded.Clock"
|
||||
/>
|
||||
|
||||
<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:textAppearance="@style/TextAppearance.StatusBar.Expanded.Date"
|
||||
/>
|
||||
<!--
|
||||
<com.android.systemui.statusbar.phone.CarrierLabel
|
||||
@ -62,22 +73,32 @@
|
||||
/>
|
||||
-->
|
||||
|
||||
<ImageView android:id="@+id/settings_button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
<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:paddingLeft="8dp"
|
||||
android:paddingRight="8dp"
|
||||
android:layout_marginLeft="12dp"
|
||||
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:src="@drawable/ic_notify_quicksettings"
|
||||
android:contentDescription="@string/accessibility_settings_button"
|
||||
/>
|
||||
|
||||
<ImageView android:id="@+id/clear_all_button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_width="32dp"
|
||||
android:layout_height="32dp"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:paddingLeft="8dp"
|
||||
android:paddingRight="8dp"
|
||||
android:src="@drawable/ic_notify_clear"
|
||||
android:contentDescription="@string/accessibility_clear_all"
|
||||
/>
|
||||
|
@ -53,5 +53,8 @@
|
||||
|
||||
<!-- When true, show 1/2G networks as 3G. -->
|
||||
<bool name="config_showMin3G">false</bool>
|
||||
|
||||
<!-- Show rotation lock button in phone-style notification panel. -->
|
||||
<bool name="config_showRotationLock">true</bool>
|
||||
</resources>
|
||||
|
||||
|
@ -21,6 +21,6 @@
|
||||
We show both (DOW on one line, then the date) but this can be overridden for locales as
|
||||
necessary.
|
||||
-->
|
||||
<string name="status_bar_date_formatter">%2$s</string>
|
||||
<string name="status_bar_date_formatter">%1$s\n%2$s</string>
|
||||
|
||||
</resources>
|
||||
|
@ -377,4 +377,12 @@
|
||||
<!-- Content text for do-not-disturb mode notification -->
|
||||
<string name="notifications_off_text">Tap here to turn notifications back on.</string>
|
||||
|
||||
<!-- Description of the button in the phone-style notification panel that controls auto-rotation, when auto-rotation is on. [CHAR LIMIT=NONE] -->
|
||||
<string name="accessibility_rotation_lock_off">Screen will rotate automatically.</string>
|
||||
|
||||
<!-- Description of the button in the phone-style notification panel that controls auto-rotation, when auto-rotation is off. [CHAR LIMIT=NONE] -->
|
||||
<string name="accessibility_rotation_lock_on_landscape">Screen is locked in landscape orientation.</string>
|
||||
|
||||
<!-- Description of the button in the phone-style notification panel that controls auto-rotation, when auto-rotation is off. [CHAR LIMIT=NONE] -->
|
||||
<string name="accessibility_rotation_lock_on_portrait">Screen is locked in portrait orientation.</string>
|
||||
</resources>
|
||||
|
@ -53,6 +53,21 @@
|
||||
<item name="android:textColor">@android:color/holo_blue_light</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.StatusBar.Expanded" parent="@*android:style/TextAppearance.StatusBar" />
|
||||
|
||||
<style name="TextAppearance.StatusBar.Expanded.Clock">
|
||||
<item name="android:textSize">32dp</item>
|
||||
<item name="android:textStyle">normal</item>
|
||||
<item name="android:textColor">#ffffff</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.StatusBar.Expanded.Date">
|
||||
<item name="android:textSize">12dp</item>
|
||||
<item name="android:textStyle">normal</item>
|
||||
<item name="android:textColor">#666666</item>
|
||||
<item name="android:textAllCaps">true</item>
|
||||
</style>
|
||||
|
||||
<style name="Animation" />
|
||||
|
||||
<style name="Animation.ShirtPocketPanel">
|
||||
|
@ -0,0 +1,30 @@
|
||||
package com.android.systemui.statusbar;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.AttributeSet;
|
||||
import android.widget.CompoundButton;
|
||||
|
||||
import com.android.systemui.statusbar.policy.AutoRotateController;
|
||||
|
||||
public class RotationToggle extends CompoundButton {
|
||||
AutoRotateController mRotater;
|
||||
|
||||
public RotationToggle(Context context) {
|
||||
super(context);
|
||||
mRotater = new AutoRotateController(context, this);
|
||||
setClickable(true);
|
||||
}
|
||||
|
||||
public RotationToggle(Context context, AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
mRotater = new AutoRotateController(context, this);
|
||||
setClickable(true);
|
||||
}
|
||||
|
||||
public RotationToggle(Context context, AttributeSet attrs, int defStyle) {
|
||||
super(context, attrs, defStyle);
|
||||
mRotater = new AutoRotateController(context, this);
|
||||
setClickable(true);
|
||||
}
|
||||
|
||||
}
|
@ -63,6 +63,7 @@ import android.view.WindowManagerImpl;
|
||||
import android.view.animation.AccelerateInterpolator;
|
||||
import android.view.animation.Animation;
|
||||
import android.view.animation.AnimationUtils;
|
||||
import android.widget.CompoundButton;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
@ -77,8 +78,10 @@ import com.android.systemui.recent.RecentTasksLoader;
|
||||
import com.android.systemui.statusbar.BaseStatusBar;
|
||||
import com.android.systemui.statusbar.NotificationData;
|
||||
import com.android.systemui.statusbar.NotificationData.Entry;
|
||||
import com.android.systemui.statusbar.RotationToggle;
|
||||
import com.android.systemui.statusbar.SignalClusterView;
|
||||
import com.android.systemui.statusbar.StatusBarIconView;
|
||||
import com.android.systemui.statusbar.policy.AutoRotateController;
|
||||
import com.android.systemui.statusbar.policy.BatteryController;
|
||||
import com.android.systemui.statusbar.policy.DateView;
|
||||
import com.android.systemui.statusbar.policy.IntruderAlertView;
|
||||
@ -169,6 +172,7 @@ public class PhoneStatusBar extends BaseStatusBar {
|
||||
// top bar
|
||||
View mClearButton;
|
||||
View mSettingsButton;
|
||||
RotationToggle mRotationButton;
|
||||
|
||||
// drag bar
|
||||
CloseDragHandle mCloseView;
|
||||
@ -299,6 +303,13 @@ public class PhoneStatusBar extends BaseStatusBar {
|
||||
|
||||
mStatusBarView = (PhoneStatusBarView) mStatusBarWindow.findViewById(R.id.status_bar);
|
||||
mNotificationPanel = mStatusBarWindow.findViewById(R.id.notification_panel);
|
||||
// don't allow clicks on the panel to pass through to the background where they will cause the panel to close
|
||||
mNotificationPanel.setOnTouchListener(new View.OnTouchListener() {
|
||||
@Override
|
||||
public boolean onTouch(View v, MotionEvent event) {
|
||||
return true;
|
||||
}
|
||||
});
|
||||
|
||||
if (ENABLE_INTRUDERS) {
|
||||
mIntruderAlertView = (IntruderAlertView) View.inflate(context, R.layout.intruder_alert, null);
|
||||
@ -344,6 +355,8 @@ public class PhoneStatusBar extends BaseStatusBar {
|
||||
mDateView = (DateView)mStatusBarWindow.findViewById(R.id.date);
|
||||
mSettingsButton = mStatusBarWindow.findViewById(R.id.settings_button);
|
||||
mSettingsButton.setOnClickListener(mSettingsButtonListener);
|
||||
mRotationButton = (RotationToggle) mStatusBarWindow.findViewById(R.id.rotation_lock_button);
|
||||
|
||||
mScrollView = (ScrollView)mStatusBarWindow.findViewById(R.id.scroll);
|
||||
mScrollView.setVerticalScrollBarEnabled(false); // less drawing during pulldowns
|
||||
|
||||
|