summaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorDaniel Sandler <dsandler@android.com>2011-07-29 06:48:43 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-07-29 06:48:43 -0700
commit94eea0b26ef0714373a58b681d77927268e56eb0 (patch)
tree4bf4cb5a492d7ac34047c83fd0f0d49e38866857 /packages
parent53f2531ba7bc72489d03fd17b6ce29c811fad8b5 (diff)
parent5298582717494098fcdf115d832c8e871340d0b5 (diff)
downloadframeworks_base-94eea0b26ef0714373a58b681d77927268e56eb0.zip
frameworks_base-94eea0b26ef0714373a58b681d77927268e56eb0.tar.gz
frameworks_base-94eea0b26ef0714373a58b681d77927268e56eb0.tar.bz2
Merge "Bring the shiny navigation button animations to phones."
Diffstat (limited to 'packages')
-rw-r--r--packages/SystemUI/res/drawable-hdpi/ic_sysbar_highlight_land.pngbin0 -> 2635 bytes
-rw-r--r--packages/SystemUI/res/drawable-mdpi/ic_sysbar_highlight_land.pngbin0 -> 2065 bytes
-rw-r--r--packages/SystemUI/res/drawable-xhdpi/ic_sysbar_highlight_land.pngbin0 -> 3879 bytes
-rw-r--r--packages/SystemUI/res/layout/navigation_bar.xml33
-rw-r--r--packages/SystemUI/res/values/strings.xml2
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyButtonView.java11
6 files changed, 35 insertions, 11 deletions
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_highlight_land.png b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_highlight_land.png
new file mode 100644
index 0000000..d050b1c
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_highlight_land.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_sysbar_highlight_land.png b/packages/SystemUI/res/drawable-mdpi/ic_sysbar_highlight_land.png
new file mode 100644
index 0000000..6f3f5fa
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/ic_sysbar_highlight_land.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_sysbar_highlight_land.png b/packages/SystemUI/res/drawable-xhdpi/ic_sysbar_highlight_land.png
new file mode 100644
index 0000000..97a07fa
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/ic_sysbar_highlight_land.png
Binary files differ
diff --git a/packages/SystemUI/res/layout/navigation_bar.xml b/packages/SystemUI/res/layout/navigation_bar.xml
index 37d390a..6732fee 100644
--- a/packages/SystemUI/res/layout/navigation_bar.xml
+++ b/packages/SystemUI/res/layout/navigation_bar.xml
@@ -35,6 +35,8 @@
android:layout_height="match_parent"
android:layout_width="match_parent"
android:orientation="horizontal"
+ android:clipChildren="false"
+ android:clipToPadding="false"
>
<!-- navigation controls -->
@@ -42,6 +44,7 @@
android:layout_width="40dp"
android:layout_height="match_parent"
android:layout_weight="0"
+ android:visibility="invisible"
/>
<com.android.systemui.statusbar.policy.KeyButtonView android:id="@+id/back"
android:layout_width="80dp"
@@ -49,12 +52,14 @@
android:src="@drawable/ic_sysbar_back"
systemui:keyCode="4"
android:layout_weight="0"
+ systemui:glowBackground="@drawable/ic_sysbar_highlight"
+ android:contentDescription="@string/accessibility_back"
/>
<View
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
- android:contentDescription="@string/accessibility_back"
+ android:visibility="invisible"
/>
<com.android.systemui.statusbar.policy.KeyButtonView android:id="@+id/home"
android:layout_width="80dp"
@@ -62,18 +67,22 @@
android:src="@drawable/ic_sysbar_home"
systemui:keyCode="3"
android:layout_weight="0"
+ systemui:glowBackground="@drawable/ic_sysbar_highlight"
+ android:contentDescription="@string/accessibility_home"
/>
<View
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
- android:contentDescription="@string/accessibility_home"
+ android:visibility="invisible"
/>
<com.android.systemui.statusbar.policy.KeyButtonView android:id="@+id/recent_apps"
android:layout_width="80dp"
android:layout_height="match_parent"
android:src="@drawable/ic_sysbar_recent"
android:layout_weight="0"
+ systemui:glowBackground="@drawable/ic_sysbar_highlight"
+ android:contentDescription="@string/accessibility_recent"
/>
<com.android.systemui.statusbar.policy.KeyButtonView android:id="@+id/menu"
android:layout_width="40dp"
@@ -83,6 +92,7 @@
android:layout_weight="0"
android:visibility="invisible"
android:contentDescription="@string/accessibility_menu"
+ systemui:glowBackground="@drawable/ic_sysbar_highlight"
/>
</LinearLayout>
@@ -106,6 +116,8 @@
android:layout_height="match_parent"
android:layout_width="match_parent"
android:orientation="vertical"
+ android:clipChildren="false"
+ android:clipToPadding="false"
>
<!-- navigation controls -->
@@ -117,17 +129,19 @@
android:layout_weight="0"
android:visibility="invisible"
/>
- <ImageView android:id="@+id/recent_apps"
+ <com.android.systemui.statusbar.policy.KeyButtonView android:id="@+id/recent_apps"
android:layout_height="80dp"
android:layout_width="match_parent"
android:src="@drawable/ic_sysbar_recent_land"
android:layout_weight="0"
+ android:contentDescription="@string/accessibility_recent"
+ systemui:glowBackground="@drawable/ic_sysbar_highlight_land"
/>
<View
android:layout_height="match_parent"
android:layout_width="match_parent"
android:layout_weight="1"
- android:contentDescription="@string/accessibility_menu"
+ android:visibility="invisible"
/>
<com.android.systemui.statusbar.policy.KeyButtonView android:id="@+id/home"
android:layout_height="80dp"
@@ -136,12 +150,13 @@
systemui:keyCode="3"
android:layout_weight="0"
android:contentDescription="@string/accessibility_home"
+ systemui:glowBackground="@drawable/ic_sysbar_highlight_land"
/>
<View
android:layout_height="match_parent"
android:layout_width="match_parent"
android:layout_weight="1"
- android:contentDescription="@string/accessibility_back"
+ android:visibility="invisible"
/>
<com.android.systemui.statusbar.policy.KeyButtonView android:id="@+id/back"
android:layout_height="80dp"
@@ -149,12 +164,18 @@
android:src="@drawable/ic_sysbar_back_land"
systemui:keyCode="4"
android:layout_weight="0"
+ android:contentDescription="@string/accessibility_back"
+ systemui:glowBackground="@drawable/ic_sysbar_highlight_land"
/>
- <View
+ <com.android.systemui.statusbar.policy.KeyButtonView android:id="@+id/menu"
android:layout_height="40dp"
android:layout_width="match_parent"
+ android:src="@drawable/ic_sysbar_menu_land"
+ systemui:keyCode="82"
android:layout_weight="0"
+ android:visibility="invisible"
android:contentDescription="@string/accessibility_menu"
+ systemui:glowBackground="@drawable/ic_sysbar_highlight_land"
/>
</LinearLayout>
diff --git a/packages/SystemUI/res/values/strings.xml b/packages/SystemUI/res/values/strings.xml
index 5ca77fc..2b3118d 100644
--- a/packages/SystemUI/res/values/strings.xml
+++ b/packages/SystemUI/res/values/strings.xml
@@ -185,6 +185,8 @@
<string name="accessibility_home">Home</string>
<!-- Content description of the menu button for accessibility (not shown on the screen). [CHAR LIMIT=NONE] -->
<string name="accessibility_menu">Menu</string>
+ <!-- Content description of the recents button for accessibility (not shown on the screen). [CHAR LIMIT=NONE] -->
+ <string name="accessibility_recent">Recent applications</string>
<!-- Content description of the switch input method button for accessibility (not shown on the screen). [CHAR LIMIT=NONE] -->
<string name="accessibility_ime_switch_button">Switch input method button.</string>
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyButtonView.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyButtonView.java
index 87fbbb7..38a1029 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyButtonView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyButtonView.java
@@ -159,13 +159,14 @@ public class KeyButtonView extends ImageView {
if (x < 1.0f) {
invalidate();
} else {
- x = (w * (x - 1.0f)) / 2.0f;
+ final float rx = (w * (x - 1.0f)) / 2.0f;
+ final float ry = (h * (x - 1.0f)) / 2.0f;
com.android.systemui.SwipeHelper.invalidateGlobalRegion(
this,
- new RectF(getLeft() - x,
- getTop() - x,
- getRight() + x,
- getBottom() + x));
+ new RectF(getLeft() - rx,
+ getTop() - ry,
+ getRight() + rx,
+ getBottom() + ry));
}
}