summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--res/drawable-hdpi/all_apps_button_focused.pngbin0 -> 2742 bytes
-rw-r--r--res/drawable-hdpi/all_apps_button_normal.pngbin1536 -> 2374 bytes
-rw-r--r--res/drawable-hdpi/all_apps_button_pressed.pngbin1559 -> 2720 bytes
-rw-r--r--res/drawable-hdpi/home_button_focused.pngbin3345 -> 4878 bytes
-rw-r--r--res/drawable-hdpi/home_button_normal.pngbin3414 -> 4404 bytes
-rw-r--r--res/drawable-hdpi/home_button_pressed.pngbin3345 -> 4853 bytes
-rw-r--r--res/drawable-hdpi/ic_home_arrows_1_focus.pngbin0 -> 1845 bytes
-rw-r--r--res/drawable-hdpi/ic_home_arrows_1_focus_right.pngbin0 -> 4530 bytes
-rw-r--r--res/drawable-hdpi/ic_home_arrows_1_normal.pngbin0 -> 1692 bytes
-rw-r--r--res/drawable-hdpi/ic_home_arrows_1_normal_right.pngbin0 -> 4330 bytes
-rw-r--r--res/drawable-hdpi/ic_home_arrows_1_press.pngbin0 -> 1842 bytes
-rw-r--r--res/drawable-hdpi/ic_home_arrows_1_press_right.pngbin0 -> 4524 bytes
-rw-r--r--res/drawable-hdpi/ic_home_arrows_2_focus.pngbin0 -> 5090 bytes
-rw-r--r--res/drawable-hdpi/ic_home_arrows_2_focus_right.pngbin0 -> 5112 bytes
-rw-r--r--res/drawable-hdpi/ic_home_arrows_2_normal.pngbin0 -> 5022 bytes
-rw-r--r--res/drawable-hdpi/ic_home_arrows_2_normal_right.pngbin0 -> 4970 bytes
-rw-r--r--res/drawable-hdpi/ic_home_arrows_2_press.pngbin0 -> 2400 bytes
-rw-r--r--res/drawable-hdpi/ic_home_arrows_2_press_right.pngbin0 -> 5083 bytes
-rw-r--r--res/drawable-hdpi/ic_home_arrows_3_focus.pngbin0 -> 2614 bytes
-rw-r--r--res/drawable-hdpi/ic_home_arrows_3_focus_right.pngbin0 -> 5310 bytes
-rw-r--r--res/drawable-hdpi/ic_home_arrows_3_normal.pngbin0 -> 2529 bytes
-rw-r--r--res/drawable-hdpi/ic_home_arrows_3_normal_right.pngbin0 -> 5185 bytes
-rw-r--r--res/drawable-hdpi/ic_home_arrows_3_press.pngbin0 -> 2602 bytes
-rw-r--r--res/drawable-hdpi/ic_home_arrows_3_press_right.pngbin0 -> 5281 bytes
-rw-r--r--res/drawable-hdpi/ic_home_arrows_4_focus.pngbin0 -> 2633 bytes
-rw-r--r--res/drawable-hdpi/ic_home_arrows_4_focus_right.pngbin0 -> 5335 bytes
-rw-r--r--res/drawable-hdpi/ic_home_arrows_4_normal.pngbin0 -> 2504 bytes
-rw-r--r--res/drawable-hdpi/ic_home_arrows_4_normal_right.pngbin0 -> 5268 bytes
-rw-r--r--res/drawable-hdpi/ic_home_arrows_4_press.pngbin0 -> 2617 bytes
-rw-r--r--res/drawable-hdpi/ic_home_arrows_4_press_right.pngbin0 -> 5309 bytes
-rw-r--r--res/drawable-hdpi/trashcan.pngbin2046 -> 2883 bytes
-rw-r--r--res/drawable-hdpi/trashcan_hover.pngbin2041 -> 3046 bytes
-rw-r--r--res/drawable/all_apps_button.xml2
-rw-r--r--res/drawable/home_arrows_left.xml23
-rw-r--r--res/drawable/home_arrows_left_1.xml22
-rw-r--r--res/drawable/home_arrows_left_2.xml22
-rw-r--r--res/drawable/home_arrows_left_3.xml22
-rw-r--r--res/drawable/home_arrows_left_4.xml22
-rw-r--r--res/drawable/home_arrows_right.xml23
-rw-r--r--res/drawable/home_arrows_right_1.xml22
-rw-r--r--res/drawable/home_arrows_right_2.xml22
-rw-r--r--res/drawable/home_arrows_right_3.xml22
-rw-r--r--res/drawable/home_arrows_right_4.xml22
-rw-r--r--res/layout-port/launcher.xml36
-rw-r--r--src/com/android/launcher2/DragLayer.java16
-rw-r--r--src/com/android/launcher2/Launcher.java20
-rw-r--r--src/com/android/launcher2/Workspace.java22
47 files changed, 281 insertions, 37 deletions
diff --git a/res/drawable-hdpi/all_apps_button_focused.png b/res/drawable-hdpi/all_apps_button_focused.png
new file mode 100644
index 000000000..5860c703f
--- /dev/null
+++ b/res/drawable-hdpi/all_apps_button_focused.png
Binary files differ
diff --git a/res/drawable-hdpi/all_apps_button_normal.png b/res/drawable-hdpi/all_apps_button_normal.png
index c29d3d782..3ebdbb493 100644
--- a/res/drawable-hdpi/all_apps_button_normal.png
+++ b/res/drawable-hdpi/all_apps_button_normal.png
Binary files differ
diff --git a/res/drawable-hdpi/all_apps_button_pressed.png b/res/drawable-hdpi/all_apps_button_pressed.png
index 4c64d692d..b8bb7a8db 100644
--- a/res/drawable-hdpi/all_apps_button_pressed.png
+++ b/res/drawable-hdpi/all_apps_button_pressed.png
Binary files differ
diff --git a/res/drawable-hdpi/home_button_focused.png b/res/drawable-hdpi/home_button_focused.png
index 392bc6685..08b1fcbc8 100644
--- a/res/drawable-hdpi/home_button_focused.png
+++ b/res/drawable-hdpi/home_button_focused.png
Binary files differ
diff --git a/res/drawable-hdpi/home_button_normal.png b/res/drawable-hdpi/home_button_normal.png
index 40fbbfd8a..4afcce8d2 100644
--- a/res/drawable-hdpi/home_button_normal.png
+++ b/res/drawable-hdpi/home_button_normal.png
Binary files differ
diff --git a/res/drawable-hdpi/home_button_pressed.png b/res/drawable-hdpi/home_button_pressed.png
index 392bc6685..aa917329d 100644
--- a/res/drawable-hdpi/home_button_pressed.png
+++ b/res/drawable-hdpi/home_button_pressed.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_home_arrows_1_focus.png b/res/drawable-hdpi/ic_home_arrows_1_focus.png
new file mode 100644
index 000000000..4574682c6
--- /dev/null
+++ b/res/drawable-hdpi/ic_home_arrows_1_focus.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_home_arrows_1_focus_right.png b/res/drawable-hdpi/ic_home_arrows_1_focus_right.png
new file mode 100644
index 000000000..454afceac
--- /dev/null
+++ b/res/drawable-hdpi/ic_home_arrows_1_focus_right.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_home_arrows_1_normal.png b/res/drawable-hdpi/ic_home_arrows_1_normal.png
new file mode 100644
index 000000000..88ce15fb9
--- /dev/null
+++ b/res/drawable-hdpi/ic_home_arrows_1_normal.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_home_arrows_1_normal_right.png b/res/drawable-hdpi/ic_home_arrows_1_normal_right.png
new file mode 100644
index 000000000..dd39d9b3f
--- /dev/null
+++ b/res/drawable-hdpi/ic_home_arrows_1_normal_right.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_home_arrows_1_press.png b/res/drawable-hdpi/ic_home_arrows_1_press.png
new file mode 100644
index 000000000..93e0ea544
--- /dev/null
+++ b/res/drawable-hdpi/ic_home_arrows_1_press.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_home_arrows_1_press_right.png b/res/drawable-hdpi/ic_home_arrows_1_press_right.png
new file mode 100644
index 000000000..be141bcc1
--- /dev/null
+++ b/res/drawable-hdpi/ic_home_arrows_1_press_right.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_home_arrows_2_focus.png b/res/drawable-hdpi/ic_home_arrows_2_focus.png
new file mode 100644
index 000000000..cbcaf40c7
--- /dev/null
+++ b/res/drawable-hdpi/ic_home_arrows_2_focus.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_home_arrows_2_focus_right.png b/res/drawable-hdpi/ic_home_arrows_2_focus_right.png
new file mode 100644
index 000000000..0f5048203
--- /dev/null
+++ b/res/drawable-hdpi/ic_home_arrows_2_focus_right.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_home_arrows_2_normal.png b/res/drawable-hdpi/ic_home_arrows_2_normal.png
new file mode 100644
index 000000000..9337c1cfc
--- /dev/null
+++ b/res/drawable-hdpi/ic_home_arrows_2_normal.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_home_arrows_2_normal_right.png b/res/drawable-hdpi/ic_home_arrows_2_normal_right.png
new file mode 100644
index 000000000..646437fe2
--- /dev/null
+++ b/res/drawable-hdpi/ic_home_arrows_2_normal_right.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_home_arrows_2_press.png b/res/drawable-hdpi/ic_home_arrows_2_press.png
new file mode 100644
index 000000000..e9daab28b
--- /dev/null
+++ b/res/drawable-hdpi/ic_home_arrows_2_press.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_home_arrows_2_press_right.png b/res/drawable-hdpi/ic_home_arrows_2_press_right.png
new file mode 100644
index 000000000..8565fc801
--- /dev/null
+++ b/res/drawable-hdpi/ic_home_arrows_2_press_right.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_home_arrows_3_focus.png b/res/drawable-hdpi/ic_home_arrows_3_focus.png
new file mode 100644
index 000000000..45b26bc61
--- /dev/null
+++ b/res/drawable-hdpi/ic_home_arrows_3_focus.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_home_arrows_3_focus_right.png b/res/drawable-hdpi/ic_home_arrows_3_focus_right.png
new file mode 100644
index 000000000..1c045fecd
--- /dev/null
+++ b/res/drawable-hdpi/ic_home_arrows_3_focus_right.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_home_arrows_3_normal.png b/res/drawable-hdpi/ic_home_arrows_3_normal.png
new file mode 100644
index 000000000..56e4978b8
--- /dev/null
+++ b/res/drawable-hdpi/ic_home_arrows_3_normal.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_home_arrows_3_normal_right.png b/res/drawable-hdpi/ic_home_arrows_3_normal_right.png
new file mode 100644
index 000000000..ef9114be1
--- /dev/null
+++ b/res/drawable-hdpi/ic_home_arrows_3_normal_right.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_home_arrows_3_press.png b/res/drawable-hdpi/ic_home_arrows_3_press.png
new file mode 100644
index 000000000..9e9c6cb7e
--- /dev/null
+++ b/res/drawable-hdpi/ic_home_arrows_3_press.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_home_arrows_3_press_right.png b/res/drawable-hdpi/ic_home_arrows_3_press_right.png
new file mode 100644
index 000000000..f3ac1d200
--- /dev/null
+++ b/res/drawable-hdpi/ic_home_arrows_3_press_right.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_home_arrows_4_focus.png b/res/drawable-hdpi/ic_home_arrows_4_focus.png
new file mode 100644
index 000000000..b7e498041
--- /dev/null
+++ b/res/drawable-hdpi/ic_home_arrows_4_focus.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_home_arrows_4_focus_right.png b/res/drawable-hdpi/ic_home_arrows_4_focus_right.png
new file mode 100644
index 000000000..7f4857e0e
--- /dev/null
+++ b/res/drawable-hdpi/ic_home_arrows_4_focus_right.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_home_arrows_4_normal.png b/res/drawable-hdpi/ic_home_arrows_4_normal.png
new file mode 100644
index 000000000..9cdf51938
--- /dev/null
+++ b/res/drawable-hdpi/ic_home_arrows_4_normal.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_home_arrows_4_normal_right.png b/res/drawable-hdpi/ic_home_arrows_4_normal_right.png
new file mode 100644
index 000000000..de67f175d
--- /dev/null
+++ b/res/drawable-hdpi/ic_home_arrows_4_normal_right.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_home_arrows_4_press.png b/res/drawable-hdpi/ic_home_arrows_4_press.png
new file mode 100644
index 000000000..3ff701d33
--- /dev/null
+++ b/res/drawable-hdpi/ic_home_arrows_4_press.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_home_arrows_4_press_right.png b/res/drawable-hdpi/ic_home_arrows_4_press_right.png
new file mode 100644
index 000000000..33fcc7b8f
--- /dev/null
+++ b/res/drawable-hdpi/ic_home_arrows_4_press_right.png
Binary files differ
diff --git a/res/drawable-hdpi/trashcan.png b/res/drawable-hdpi/trashcan.png
index 8d3d8e413..712fc6ff5 100644
--- a/res/drawable-hdpi/trashcan.png
+++ b/res/drawable-hdpi/trashcan.png
Binary files differ
diff --git a/res/drawable-hdpi/trashcan_hover.png b/res/drawable-hdpi/trashcan_hover.png
index 59f2741d3..9d7131e1f 100644
--- a/res/drawable-hdpi/trashcan_hover.png
+++ b/res/drawable-hdpi/trashcan_hover.png
Binary files differ
diff --git a/res/drawable/all_apps_button.xml b/res/drawable/all_apps_button.xml
index 985bdff3f..9f6b8ac01 100644
--- a/res/drawable/all_apps_button.xml
+++ b/res/drawable/all_apps_button.xml
@@ -16,7 +16,7 @@
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true" android:drawable="@drawable/all_apps_button_pressed" />
- <item android:state_focused="true" android:state_window_focused="true" android:drawable="@drawable/all_apps_button_pressed" />
+ <item android:state_focused="true" android:state_window_focused="true" android:drawable="@drawable/all_apps_button_focused" />
<item android:state_focused="true" android:state_window_focused="false" android:drawable="@drawable/all_apps_button_normal" />
<item android:drawable="@drawable/all_apps_button_normal" />
</selector>
diff --git a/res/drawable/home_arrows_left.xml b/res/drawable/home_arrows_left.xml
new file mode 100644
index 000000000..82df25898
--- /dev/null
+++ b/res/drawable/home_arrows_left.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2009 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.
+-->
+
+<level-list xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:maxLevel="0" android:drawable="@android:color/transparent" />
+ <item android:maxLevel="1" android:drawable="@drawable/home_arrows_left_1" />
+ <item android:maxLevel="2" android:drawable="@drawable/home_arrows_left_2" />
+ <item android:maxLevel="3" android:drawable="@drawable/home_arrows_left_3" />
+ <item android:maxLevel="4" android:drawable="@drawable/home_arrows_left_4" />
+</level-list>
diff --git a/res/drawable/home_arrows_left_1.xml b/res/drawable/home_arrows_left_1.xml
new file mode 100644
index 000000000..f61f39ea5
--- /dev/null
+++ b/res/drawable/home_arrows_left_1.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2009 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/ic_home_arrows_1_press" />
+ <item android:state_focused="true" android:state_window_focused="true" android:drawable="@drawable/ic_home_arrows_1_focus" />
+ <item android:state_focused="true" android:state_window_focused="false" android:drawable="@drawable/ic_home_arrows_1_normal" />
+ <item android:drawable="@drawable/ic_home_arrows_1_normal" />
+</selector>
diff --git a/res/drawable/home_arrows_left_2.xml b/res/drawable/home_arrows_left_2.xml
new file mode 100644
index 000000000..888a2589e
--- /dev/null
+++ b/res/drawable/home_arrows_left_2.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2009 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/ic_home_arrows_2_press" />
+ <item android:state_focused="true" android:state_window_focused="true" android:drawable="@drawable/ic_home_arrows_2_focus" />
+ <item android:state_focused="true" android:state_window_focused="false" android:drawable="@drawable/ic_home_arrows_2_normal" />
+ <item android:drawable="@drawable/ic_home_arrows_2_normal" />
+</selector>
diff --git a/res/drawable/home_arrows_left_3.xml b/res/drawable/home_arrows_left_3.xml
new file mode 100644
index 000000000..4dbdf15dd
--- /dev/null
+++ b/res/drawable/home_arrows_left_3.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2009 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/ic_home_arrows_3_press" />
+ <item android:state_focused="true" android:state_window_focused="true" android:drawable="@drawable/ic_home_arrows_3_focus" />
+ <item android:state_focused="true" android:state_window_focused="false" android:drawable="@drawable/ic_home_arrows_3_normal" />
+ <item android:drawable="@drawable/ic_home_arrows_3_normal" />
+</selector>
diff --git a/res/drawable/home_arrows_left_4.xml b/res/drawable/home_arrows_left_4.xml
new file mode 100644
index 000000000..31b381d02
--- /dev/null
+++ b/res/drawable/home_arrows_left_4.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2009 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/ic_home_arrows_4_press" />
+ <item android:state_focused="true" android:state_window_focused="true" android:drawable="@drawable/ic_home_arrows_4_focus" />
+ <item android:state_focused="true" android:state_window_focused="false" android:drawable="@drawable/ic_home_arrows_4_normal" />
+ <item android:drawable="@drawable/ic_home_arrows_4_normal" />
+</selector>
diff --git a/res/drawable/home_arrows_right.xml b/res/drawable/home_arrows_right.xml
new file mode 100644
index 000000000..8ab0dec9d
--- /dev/null
+++ b/res/drawable/home_arrows_right.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2009 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.
+-->
+
+<level-list xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:maxLevel="0" android:drawable="@drawable/home_arrows_right_4" />
+ <item android:maxLevel="1" android:drawable="@drawable/home_arrows_right_3" />
+ <item android:maxLevel="2" android:drawable="@drawable/home_arrows_right_2" />
+ <item android:maxLevel="3" android:drawable="@drawable/home_arrows_right_1" />
+ <item android:maxLevel="4" android:drawable="@android:color/transparent" />
+</level-list>
diff --git a/res/drawable/home_arrows_right_1.xml b/res/drawable/home_arrows_right_1.xml
new file mode 100644
index 000000000..f49b760f3
--- /dev/null
+++ b/res/drawable/home_arrows_right_1.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2009 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/ic_home_arrows_1_press_right" />
+ <item android:state_focused="true" android:state_window_focused="true" android:drawable="@drawable/ic_home_arrows_1_focus_right" />
+ <item android:state_focused="true" android:state_window_focused="false" android:drawable="@drawable/ic_home_arrows_1_normal_right" />
+ <item android:drawable="@drawable/ic_home_arrows_1_normal_right" />
+</selector>
diff --git a/res/drawable/home_arrows_right_2.xml b/res/drawable/home_arrows_right_2.xml
new file mode 100644
index 000000000..17318a3a6
--- /dev/null
+++ b/res/drawable/home_arrows_right_2.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2009 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/ic_home_arrows_2_press_right" />
+ <item android:state_focused="true" android:state_window_focused="true" android:drawable="@drawable/ic_home_arrows_2_focus_right" />
+ <item android:state_focused="true" android:state_window_focused="false" android:drawable="@drawable/ic_home_arrows_2_normal_right" />
+ <item android:drawable="@drawable/ic_home_arrows_2_normal_right" />
+</selector>
diff --git a/res/drawable/home_arrows_right_3.xml b/res/drawable/home_arrows_right_3.xml
new file mode 100644
index 000000000..375f8e39a
--- /dev/null
+++ b/res/drawable/home_arrows_right_3.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2009 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/ic_home_arrows_3_press_right" />
+ <item android:state_focused="true" android:state_window_focused="true" android:drawable="@drawable/ic_home_arrows_3_focus_right" />
+ <item android:state_focused="true" android:state_window_focused="false" android:drawable="@drawable/ic_home_arrows_3_normal_right" />
+ <item android:drawable="@drawable/ic_home_arrows_3_normal_right" />
+</selector>
diff --git a/res/drawable/home_arrows_right_4.xml b/res/drawable/home_arrows_right_4.xml
new file mode 100644
index 000000000..06627c6d5
--- /dev/null
+++ b/res/drawable/home_arrows_right_4.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2009 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/ic_home_arrows_4_press_right" />
+ <item android:state_focused="true" android:state_window_focused="true" android:drawable="@drawable/ic_home_arrows_4_focus_right" />
+ <item android:state_focused="true" android:state_window_focused="false" android:drawable="@drawable/ic_home_arrows_4_normal_right" />
+ <item android:drawable="@drawable/ic_home_arrows_4_normal_right" />
+</selector>
diff --git a/res/layout-port/launcher.xml b/res/layout-port/launcher.xml
index d3069a178..e5fb6fb4b 100644
--- a/res/layout-port/launcher.xml
+++ b/res/layout-port/launcher.xml
@@ -40,8 +40,6 @@
android:id="@+id/workspace"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
- android:scrollbars="horizontal"
- android:fadeScrollbars="true"
launcher:defaultScreen="2">
<include android:id="@+id/cell1" layout="@layout/workspace_screen" />
@@ -52,9 +50,37 @@
</com.android.launcher2.Workspace>
+ <ImageView
+ android:id="@+id/previous_screen"
+ android:layout_width="53dip"
+ android:layout_height="@dimen/button_bar_height"
+ android:layout_gravity="bottom|left"
+ android:layout_marginLeft="6dip"
+
+ android:src="@drawable/home_arrows_left"
+
+ android:onClick="previousScreen"
+
+ android:focusable="true"
+ android:clickable="true" />
+
+ <ImageView
+ android:id="@+id/next_screen"
+ android:layout_width="53dip"
+ android:layout_height="@dimen/button_bar_height"
+ android:layout_gravity="bottom|right"
+ android:layout_marginRight="6dip"
+
+ android:src="@drawable/home_arrows_right"
+
+ android:onClick="nextScreen"
+
+ android:focusable="true"
+ android:clickable="true" />
+
<com.android.launcher2.HandleView
android:id="@+id/all_apps_button"
- android:layout_width="fill_parent"
+ android:layout_width="wrap_content"
android:layout_height="@dimen/button_bar_height"
android:layout_gravity="bottom|center_horizontal"
@@ -68,8 +94,8 @@
<com.android.launcher2.DeleteZone
android:id="@+id/delete_zone"
- android:layout_width="fill_parent"
- android:layout_height="49dip"
+ android:layout_width="wrap_content"
+ android:layout_height="@dimen/button_bar_height"
android:layout_gravity="bottom|center_horizontal"
android:scaleType="center"
diff --git a/src/com/android/launcher2/DragLayer.java b/src/com/android/launcher2/DragLayer.java
index 73901d338..51e3f2531 100644
--- a/src/com/android/launcher2/DragLayer.java
+++ b/src/com/android/launcher2/DragLayer.java
@@ -17,31 +17,15 @@
package com.android.launcher2;
import android.content.Context;
-import android.graphics.Bitmap;
-import android.graphics.Canvas;
-import android.graphics.Matrix;
-import android.graphics.Rect;
-import android.graphics.RectF;
-import android.graphics.Paint;
-import android.graphics.PorterDuffColorFilter;
-import android.graphics.PorterDuff;
-import android.os.Vibrator;
-import android.os.SystemClock;
import android.util.AttributeSet;
-import android.util.Log;
import android.view.MotionEvent;
-import android.view.View;
-import android.view.ViewGroup;
import android.view.KeyEvent;
-import android.view.inputmethod.InputMethodManager;
import android.widget.FrameLayout;
/**
* A ViewGroup that coordinated dragging across its dscendants
*/
public class DragLayer extends FrameLayout {
- private static final String TAG = "Launcher.DragLayer";
-
DragController mDragController;
/**
diff --git a/src/com/android/launcher2/Launcher.java b/src/com/android/launcher2/Launcher.java
index be1ee67bc..738793b6d 100644
--- a/src/com/android/launcher2/Launcher.java
+++ b/src/com/android/launcher2/Launcher.java
@@ -65,11 +65,11 @@ import android.view.inputmethod.InputMethodManager;
import android.widget.EditText;
import android.widget.TextView;
import android.widget.Toast;
+import android.widget.ImageView;
import android.appwidget.AppWidgetManager;
import android.appwidget.AppWidgetProviderInfo;
import java.util.ArrayList;
-import java.util.Map.Entry;
import java.util.HashMap;
import java.io.DataOutputStream;
import java.io.FileNotFoundException;
@@ -550,10 +550,10 @@ public final class Launcher extends Activity
mHandleView = (HandleView) findViewById(R.id.all_apps_button);
mHandleView.setLauncher(this);
mHandleView.setOnClickListener(this);
- /* TODO
- TransitionDrawable handleIcon = (TransitionDrawable) mHandleView.getDrawable();
- handleIocon.setCrossFadeEnabled(true);
- */
+
+ Drawable previous = ((ImageView) dragLayer.findViewById(R.id.previous_screen)).getDrawable();
+ Drawable next = ((ImageView) dragLayer.findViewById(R.id.next_screen)).getDrawable();
+ mWorkspace.setIndicators(previous, next);
workspace.setOnLongClickListener(this);
workspace.setDragController(dragController);
@@ -572,6 +572,16 @@ public final class Launcher extends Activity
dragController.addDropTarget(deleteZone);
}
+ @SuppressWarnings({"UnusedDeclaration"})
+ public void previousScreen(View v) {
+ mWorkspace.scrollLeft();
+ }
+
+ @SuppressWarnings({"UnusedDeclaration"})
+ public void nextScreen(View v) {
+ mWorkspace.scrollRight();
+ }
+
/**
* Creates a view representing a shortcut.
*
diff --git a/src/com/android/launcher2/Workspace.java b/src/com/android/launcher2/Workspace.java
index a14a11f20..d7b20fb7f 100644
--- a/src/com/android/launcher2/Workspace.java
+++ b/src/com/android/launcher2/Workspace.java
@@ -108,6 +108,9 @@ public class Workspace extends ViewGroup implements DropTarget, DragSource, Drag
int mDrawerContentHeight;
int mDrawerContentWidth;
+ private Drawable mPreviousIndicator;
+ private Drawable mNextIndicator;
+
/**
* Used to inflate the Workspace from XML.
*
@@ -462,6 +465,8 @@ public class Workspace extends ViewGroup implements DropTarget, DragSource, Drag
postInvalidate();
} else if (mNextScreen != INVALID_SCREEN) {
mCurrentScreen = Math.max(0, Math.min(mNextScreen, getChildCount() - 1));
+ mPreviousIndicator.setLevel(mCurrentScreen);
+ mNextIndicator.setLevel(mCurrentScreen);
Launcher.setScreen(mCurrentScreen);
mNextScreen = INVALID_SCREEN;
clearChildrenCache();
@@ -543,14 +548,6 @@ public class Workspace extends ViewGroup implements DropTarget, DragSource, Drag
if (restore) {
canvas.restoreToCount(restoreCount);
}
-
- onDrawScrollBars(canvas);
- }
-
- @Override
- protected int computeHorizontalScrollRange() {
- final int count = getChildCount();
- return count == 0 ? getWidth() : (getChildAt(count - 1)).getRight();
}
private float mScale = 1.0f;
@@ -794,7 +791,6 @@ public class Workspace extends ViewGroup implements DropTarget, DragSource, Drag
void enableChildrenCache(int fromScreen, int toScreen) {
if (fromScreen > toScreen) {
- int temp = fromScreen;
fromScreen = toScreen;
toScreen = fromScreen;
}
@@ -805,7 +801,6 @@ public class Workspace extends ViewGroup implements DropTarget, DragSource, Drag
toScreen = Math.min(toScreen, count - 1);
for (int i = fromScreen; i <= toScreen; i++) {
- // Log.d("TAG", "enablingChildrenCache: " + i);
final CellLayout layout = (CellLayout) getChildAt(i);
layout.setChildrenDrawnWithCacheEnabled(true);
layout.setChildrenDrawingCacheEnabled(true);
@@ -1392,6 +1387,13 @@ public class Workspace extends ViewGroup implements DropTarget, DragSource, Drag
getChildAt(mDefaultScreen).requestFocus();
}
+ void setIndicators(Drawable previous, Drawable next) {
+ mPreviousIndicator = previous;
+ mNextIndicator = next;
+ previous.setLevel(mCurrentScreen);
+ next.setLevel(mCurrentScreen);
+ }
+
public static class SavedState extends BaseSavedState {
int currentScreen = -1;