Merge "Import revised translations."
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index ace53ef..8382977 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -68,7 +68,7 @@
android:label="@string/application_name"
android:icon="@drawable/ic_launcher_home"
android:hardwareAccelerated="@bool/config_hardwareAccelerated"
- android:largeHeap="true">
+ android:largeHeap="@bool/config_largeHeap">
<activity
android:name="com.android.launcher2.Launcher"
android:launchMode="singleTask"
diff --git a/res/drawable-hdpi/all_apps_button_focused.png b/res/drawable-hdpi/all_apps_button_focused.png
deleted file mode 100644
index ace493b..0000000
--- a/res/drawable-hdpi/all_apps_button_focused.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/all_apps_button_normal.png b/res/drawable-hdpi/all_apps_button_normal.png
deleted file mode 100644
index cde455d..0000000
--- a/res/drawable-hdpi/all_apps_button_normal.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/all_apps_button_pressed.png b/res/drawable-hdpi/all_apps_button_pressed.png
deleted file mode 100644
index d5f9f54..0000000
--- a/res/drawable-hdpi/all_apps_button_pressed.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/box_launcher_top_normal.9.png b/res/drawable-hdpi/box_launcher_top_normal.9.png
deleted file mode 100644
index af04b07..0000000
--- a/res/drawable-hdpi/box_launcher_top_normal.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/box_launcher_top_pressed.9.png b/res/drawable-hdpi/box_launcher_top_pressed.9.png
deleted file mode 100644
index af04b07..0000000
--- a/res/drawable-hdpi/box_launcher_top_pressed.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/box_launcher_top_selected.9.png b/res/drawable-hdpi/box_launcher_top_selected.9.png
deleted file mode 100644
index af04b07..0000000
--- a/res/drawable-hdpi/box_launcher_top_selected.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/focused_application_background.9.png b/res/drawable-hdpi/focused_application_background.9.png
deleted file mode 100644
index 7bf37ef..0000000
--- a/res/drawable-hdpi/focused_application_background.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/home_button_focused.png b/res/drawable-hdpi/home_button_focused.png
deleted file mode 100644
index 08b1fcb..0000000
--- a/res/drawable-hdpi/home_button_focused.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/home_button_normal.png b/res/drawable-hdpi/home_button_normal.png
deleted file mode 100644
index 4afcce8..0000000
--- a/res/drawable-hdpi/home_button_normal.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/home_button_pressed.png b/res/drawable-hdpi/home_button_pressed.png
deleted file mode 100644
index aa91732..0000000
--- a/res/drawable-hdpi/home_button_pressed.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/hotseat_bg_center.9.png b/res/drawable-hdpi/hotseat_bg_center.9.png
deleted file mode 100644
index e162970..0000000
--- a/res/drawable-hdpi/hotseat_bg_center.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/hotseat_bg_left.9.png b/res/drawable-hdpi/hotseat_bg_left.9.png
deleted file mode 100644
index 39e079d..0000000
--- a/res/drawable-hdpi/hotseat_bg_left.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/hotseat_bg_right.9.png b/res/drawable-hdpi/hotseat_bg_right.9.png
deleted file mode 100644
index 921216b..0000000
--- a/res/drawable-hdpi/hotseat_bg_right.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/hotseat_browser_focused.png b/res/drawable-hdpi/hotseat_browser_focused.png
deleted file mode 100644
index 4ab51dd..0000000
--- a/res/drawable-hdpi/hotseat_browser_focused.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/hotseat_browser_normal.png b/res/drawable-hdpi/hotseat_browser_normal.png
deleted file mode 100644
index 77ae927..0000000
--- a/res/drawable-hdpi/hotseat_browser_normal.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/hotseat_browser_pressed.png b/res/drawable-hdpi/hotseat_browser_pressed.png
deleted file mode 100644
index cfe963b..0000000
--- a/res/drawable-hdpi/hotseat_browser_pressed.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/hotseat_phone_focused.png b/res/drawable-hdpi/hotseat_phone_focused.png
deleted file mode 100644
index f81f0a8..0000000
--- a/res/drawable-hdpi/hotseat_phone_focused.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/hotseat_phone_normal.png b/res/drawable-hdpi/hotseat_phone_normal.png
deleted file mode 100644
index 391802e..0000000
--- a/res/drawable-hdpi/hotseat_phone_normal.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/hotseat_phone_pressed.png b/res/drawable-hdpi/hotseat_phone_pressed.png
deleted file mode 100644
index a6c2baf..0000000
--- a/res/drawable-hdpi/hotseat_phone_pressed.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-land-hdpi/hotseat_bg_center.9.png b/res/drawable-land-hdpi/hotseat_bg_center.9.png
deleted file mode 100644
index 958b4a4..0000000
--- a/res/drawable-land-hdpi/hotseat_bg_center.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-land-hdpi/hotseat_bg_left.9.png b/res/drawable-land-hdpi/hotseat_bg_left.9.png
deleted file mode 100644
index 9ea8f9d..0000000
--- a/res/drawable-land-hdpi/hotseat_bg_left.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-land-hdpi/hotseat_bg_right.9.png b/res/drawable-land-hdpi/hotseat_bg_right.9.png
deleted file mode 100644
index ce8f1e2..0000000
--- a/res/drawable-land-hdpi/hotseat_bg_right.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-land-hdpi/hotseat_track_holo.9.png b/res/drawable-land-hdpi/hotseat_track_holo.9.png
new file mode 100644
index 0000000..165870e
--- /dev/null
+++ b/res/drawable-land-hdpi/hotseat_track_holo.9.png
Binary files differ
diff --git a/res/drawable-land-mdpi/hotseat_bg_center.9.png b/res/drawable-land-mdpi/hotseat_bg_center.9.png
deleted file mode 100644
index 691ab01..0000000
--- a/res/drawable-land-mdpi/hotseat_bg_center.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-land-mdpi/hotseat_bg_left.9.png b/res/drawable-land-mdpi/hotseat_bg_left.9.png
deleted file mode 100644
index bd235f3..0000000
--- a/res/drawable-land-mdpi/hotseat_bg_left.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-land-mdpi/hotseat_bg_right.9.png b/res/drawable-land-mdpi/hotseat_bg_right.9.png
deleted file mode 100644
index 6d87f0d..0000000
--- a/res/drawable-land-mdpi/hotseat_bg_right.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-land-mdpi/hotseat_track_holo.9.png b/res/drawable-land-mdpi/hotseat_track_holo.9.png
new file mode 100644
index 0000000..82ed81d
--- /dev/null
+++ b/res/drawable-land-mdpi/hotseat_track_holo.9.png
Binary files differ
diff --git a/res/drawable-mdpi/all_apps_button_focused.png b/res/drawable-mdpi/all_apps_button_focused.png
deleted file mode 100644
index dd77f80..0000000
--- a/res/drawable-mdpi/all_apps_button_focused.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/all_apps_button_normal.png b/res/drawable-mdpi/all_apps_button_normal.png
deleted file mode 100644
index 2419f97..0000000
--- a/res/drawable-mdpi/all_apps_button_normal.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/all_apps_button_pressed.png b/res/drawable-mdpi/all_apps_button_pressed.png
deleted file mode 100644
index 3e6c850..0000000
--- a/res/drawable-mdpi/all_apps_button_pressed.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/box_launcher_top_normal.9.png b/res/drawable-mdpi/box_launcher_top_normal.9.png
deleted file mode 100644
index af04b07..0000000
--- a/res/drawable-mdpi/box_launcher_top_normal.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/box_launcher_top_pressed.9.png b/res/drawable-mdpi/box_launcher_top_pressed.9.png
deleted file mode 100644
index af04b07..0000000
--- a/res/drawable-mdpi/box_launcher_top_pressed.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/box_launcher_top_selected.9.png b/res/drawable-mdpi/box_launcher_top_selected.9.png
deleted file mode 100644
index af04b07..0000000
--- a/res/drawable-mdpi/box_launcher_top_selected.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/focused_application_background.9.png b/res/drawable-mdpi/focused_application_background.9.png
deleted file mode 100644
index 17ee6ea..0000000
--- a/res/drawable-mdpi/focused_application_background.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/home_button_focused.png b/res/drawable-mdpi/home_button_focused.png
deleted file mode 100644
index 4d62c1b..0000000
--- a/res/drawable-mdpi/home_button_focused.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/home_button_normal.png b/res/drawable-mdpi/home_button_normal.png
deleted file mode 100644
index 37eccc0..0000000
--- a/res/drawable-mdpi/home_button_normal.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/home_button_pressed.png b/res/drawable-mdpi/home_button_pressed.png
deleted file mode 100644
index 4b77d6d..0000000
--- a/res/drawable-mdpi/home_button_pressed.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/hotseat_bg_center.9.png b/res/drawable-mdpi/hotseat_bg_center.9.png
deleted file mode 100644
index c846d54..0000000
--- a/res/drawable-mdpi/hotseat_bg_center.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/hotseat_bg_left.9.png b/res/drawable-mdpi/hotseat_bg_left.9.png
deleted file mode 100644
index 92d583f..0000000
--- a/res/drawable-mdpi/hotseat_bg_left.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/hotseat_bg_right.9.png b/res/drawable-mdpi/hotseat_bg_right.9.png
deleted file mode 100644
index 5181b00..0000000
--- a/res/drawable-mdpi/hotseat_bg_right.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/hotseat_browser_focused.png b/res/drawable-mdpi/hotseat_browser_focused.png
deleted file mode 100644
index 0ad0878..0000000
--- a/res/drawable-mdpi/hotseat_browser_focused.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/hotseat_browser_normal.png b/res/drawable-mdpi/hotseat_browser_normal.png
deleted file mode 100644
index 52abe8c..0000000
--- a/res/drawable-mdpi/hotseat_browser_normal.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/hotseat_browser_pressed.png b/res/drawable-mdpi/hotseat_browser_pressed.png
deleted file mode 100644
index e1d35d1..0000000
--- a/res/drawable-mdpi/hotseat_browser_pressed.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/hotseat_phone_focused.png b/res/drawable-mdpi/hotseat_phone_focused.png
deleted file mode 100644
index 3b2d361..0000000
--- a/res/drawable-mdpi/hotseat_phone_focused.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/hotseat_phone_normal.png b/res/drawable-mdpi/hotseat_phone_normal.png
deleted file mode 100644
index 750960b..0000000
--- a/res/drawable-mdpi/hotseat_phone_normal.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/hotseat_phone_pressed.png b/res/drawable-mdpi/hotseat_phone_pressed.png
deleted file mode 100644
index 8ad9d5a..0000000
--- a/res/drawable-mdpi/hotseat_phone_pressed.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/default_widget_preview_holo.9.png b/res/drawable-xhdpi/default_widget_preview_holo.9.png
new file mode 100644
index 0000000..87cc975
--- /dev/null
+++ b/res/drawable-xhdpi/default_widget_preview_holo.9.png
Binary files differ
diff --git a/res/drawable-xhdpi/gardening_crosshairs.png b/res/drawable-xhdpi/gardening_crosshairs.png
new file mode 100644
index 0000000..18c9fbe
--- /dev/null
+++ b/res/drawable-xhdpi/gardening_crosshairs.png
Binary files differ
diff --git a/res/drawable-xhdpi/homescreen_blue_normal_holo.9.png b/res/drawable-xhdpi/homescreen_blue_normal_holo.9.png
new file mode 100644
index 0000000..966d0c1
--- /dev/null
+++ b/res/drawable-xhdpi/homescreen_blue_normal_holo.9.png
Binary files differ
diff --git a/res/drawable-xhdpi/homescreen_blue_strong_holo.9.png b/res/drawable-xhdpi/homescreen_blue_strong_holo.9.png
new file mode 100644
index 0000000..7e037ed
--- /dev/null
+++ b/res/drawable-xhdpi/homescreen_blue_strong_holo.9.png
Binary files differ
diff --git a/res/drawable-xhdpi/homescreen_green_normal_holo.9.png b/res/drawable-xhdpi/homescreen_green_normal_holo.9.png
new file mode 100644
index 0000000..219db3b
--- /dev/null
+++ b/res/drawable-xhdpi/homescreen_green_normal_holo.9.png
Binary files differ
diff --git a/res/drawable-xhdpi/homescreen_green_strong_holo.9.png b/res/drawable-xhdpi/homescreen_green_strong_holo.9.png
new file mode 100644
index 0000000..cc71519
--- /dev/null
+++ b/res/drawable-xhdpi/homescreen_green_strong_holo.9.png
Binary files differ
diff --git a/res/drawable-xhdpi/hotseat_bg_panel.9.png b/res/drawable-xhdpi/hotseat_bg_panel.9.png
new file mode 100644
index 0000000..6d9288e
--- /dev/null
+++ b/res/drawable-xhdpi/hotseat_bg_panel.9.png
Binary files differ
diff --git a/res/drawable-xhdpi/hotseat_scrubber_holo.9.png b/res/drawable-xhdpi/hotseat_scrubber_holo.9.png
new file mode 100644
index 0000000..55b313f
--- /dev/null
+++ b/res/drawable-xhdpi/hotseat_scrubber_holo.9.png
Binary files differ
diff --git a/res/drawable-xhdpi/hotseat_track_holo.9.png b/res/drawable-xhdpi/hotseat_track_holo.9.png
new file mode 100644
index 0000000..a362a98
--- /dev/null
+++ b/res/drawable-xhdpi/hotseat_track_holo.9.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_google_logo_normal_holo.png b/res/drawable-xhdpi/ic_google_logo_normal_holo.png
new file mode 100644
index 0000000..925e0b9
--- /dev/null
+++ b/res/drawable-xhdpi/ic_google_logo_normal_holo.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_launcher_info_active_holo.png b/res/drawable-xhdpi/ic_launcher_info_active_holo.png
new file mode 100644
index 0000000..356c074
--- /dev/null
+++ b/res/drawable-xhdpi/ic_launcher_info_active_holo.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_launcher_info_normal_holo.png b/res/drawable-xhdpi/ic_launcher_info_normal_holo.png
new file mode 100644
index 0000000..1f827fa
--- /dev/null
+++ b/res/drawable-xhdpi/ic_launcher_info_normal_holo.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_launcher_market_holo.png b/res/drawable-xhdpi/ic_launcher_market_holo.png
new file mode 100644
index 0000000..958f0de
--- /dev/null
+++ b/res/drawable-xhdpi/ic_launcher_market_holo.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_launcher_trashcan_active_holo.png b/res/drawable-xhdpi/ic_launcher_trashcan_active_holo.png
new file mode 100644
index 0000000..77cc3e4
--- /dev/null
+++ b/res/drawable-xhdpi/ic_launcher_trashcan_active_holo.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_launcher_trashcan_normal_holo.png b/res/drawable-xhdpi/ic_launcher_trashcan_normal_holo.png
new file mode 100644
index 0000000..ce6aff0
--- /dev/null
+++ b/res/drawable-xhdpi/ic_launcher_trashcan_normal_holo.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_search_google_logo_normal_holo.png b/res/drawable-xhdpi/ic_search_google_logo_normal_holo.png
new file mode 100644
index 0000000..b4978ae
--- /dev/null
+++ b/res/drawable-xhdpi/ic_search_google_logo_normal_holo.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_search_normal_holo.png b/res/drawable-xhdpi/ic_search_normal_holo.png
new file mode 100644
index 0000000..3700a0c
--- /dev/null
+++ b/res/drawable-xhdpi/ic_search_normal_holo.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_voice_search_holo.png b/res/drawable-xhdpi/ic_voice_search_holo.png
new file mode 100644
index 0000000..bab4e49
--- /dev/null
+++ b/res/drawable-xhdpi/ic_voice_search_holo.png
Binary files differ
diff --git a/res/drawable-xhdpi/page_hover_left_holo.9.png b/res/drawable-xhdpi/page_hover_left_holo.9.png
new file mode 100644
index 0000000..9187c9b
--- /dev/null
+++ b/res/drawable-xhdpi/page_hover_left_holo.9.png
Binary files differ
diff --git a/res/drawable-xhdpi/page_hover_right_holo.9.png b/res/drawable-xhdpi/page_hover_right_holo.9.png
new file mode 100644
index 0000000..ad70587
--- /dev/null
+++ b/res/drawable-xhdpi/page_hover_right_holo.9.png
Binary files differ
diff --git a/res/drawable-xhdpi/portal_container_holo.9.png b/res/drawable-xhdpi/portal_container_holo.9.png
new file mode 100644
index 0000000..55c701b
--- /dev/null
+++ b/res/drawable-xhdpi/portal_container_holo.9.png
Binary files differ
diff --git a/res/drawable-xhdpi/portal_ring_inner_holo.png b/res/drawable-xhdpi/portal_ring_inner_holo.png
new file mode 100644
index 0000000..dfdd622
--- /dev/null
+++ b/res/drawable-xhdpi/portal_ring_inner_holo.png
Binary files differ
diff --git a/res/drawable-xhdpi/portal_ring_outer_holo.png b/res/drawable-xhdpi/portal_ring_outer_holo.png
new file mode 100644
index 0000000..43579ec
--- /dev/null
+++ b/res/drawable-xhdpi/portal_ring_outer_holo.png
Binary files differ
diff --git a/res/drawable-xhdpi/portal_ring_rest.png b/res/drawable-xhdpi/portal_ring_rest.png
new file mode 100644
index 0000000..dcf1ae8
--- /dev/null
+++ b/res/drawable-xhdpi/portal_ring_rest.png
Binary files differ
diff --git a/res/drawable-xhdpi/tab_selected_focused_holo.9.png b/res/drawable-xhdpi/tab_selected_focused_holo.9.png
new file mode 100644
index 0000000..ffc7331
--- /dev/null
+++ b/res/drawable-xhdpi/tab_selected_focused_holo.9.png
Binary files differ
diff --git a/res/drawable-xhdpi/tab_selected_holo.9.png b/res/drawable-xhdpi/tab_selected_holo.9.png
new file mode 100644
index 0000000..9c98c9d
--- /dev/null
+++ b/res/drawable-xhdpi/tab_selected_holo.9.png
Binary files differ
diff --git a/res/drawable-xhdpi/tab_selected_pressed_focused_holo.9.png b/res/drawable-xhdpi/tab_selected_pressed_focused_holo.9.png
new file mode 100644
index 0000000..2412711
--- /dev/null
+++ b/res/drawable-xhdpi/tab_selected_pressed_focused_holo.9.png
Binary files differ
diff --git a/res/drawable-xhdpi/tab_selected_pressed_holo.9.png b/res/drawable-xhdpi/tab_selected_pressed_holo.9.png
new file mode 100644
index 0000000..36bdf66
--- /dev/null
+++ b/res/drawable-xhdpi/tab_selected_pressed_holo.9.png
Binary files differ
diff --git a/res/drawable-xhdpi/tab_unselected_focused_holo.9.png b/res/drawable-xhdpi/tab_unselected_focused_holo.9.png
new file mode 100644
index 0000000..dcf6964
--- /dev/null
+++ b/res/drawable-xhdpi/tab_unselected_focused_holo.9.png
Binary files differ
diff --git a/res/drawable-xhdpi/tab_unselected_holo.9.png b/res/drawable-xhdpi/tab_unselected_holo.9.png
new file mode 100644
index 0000000..557f3f5
--- /dev/null
+++ b/res/drawable-xhdpi/tab_unselected_holo.9.png
Binary files differ
diff --git a/res/drawable-xhdpi/tab_unselected_pressed_focused_holo.9.png b/res/drawable-xhdpi/tab_unselected_pressed_focused_holo.9.png
new file mode 100644
index 0000000..1653600
--- /dev/null
+++ b/res/drawable-xhdpi/tab_unselected_pressed_focused_holo.9.png
Binary files differ
diff --git a/res/drawable-xhdpi/tab_unselected_pressed_holo.9.png b/res/drawable-xhdpi/tab_unselected_pressed_holo.9.png
new file mode 100644
index 0000000..09ae705
--- /dev/null
+++ b/res/drawable-xhdpi/tab_unselected_pressed_holo.9.png
Binary files differ
diff --git a/res/drawable-xhdpi/widget_resize_frame_holo.9.png b/res/drawable-xhdpi/widget_resize_frame_holo.9.png
new file mode 100644
index 0000000..4988cad
--- /dev/null
+++ b/res/drawable-xhdpi/widget_resize_frame_holo.9.png
Binary files differ
diff --git a/res/drawable-xhdpi/widget_resize_handle_bottom.png b/res/drawable-xhdpi/widget_resize_handle_bottom.png
new file mode 100644
index 0000000..18b5a26
--- /dev/null
+++ b/res/drawable-xhdpi/widget_resize_handle_bottom.png
Binary files differ
diff --git a/res/drawable-xhdpi/widget_resize_handle_left.png b/res/drawable-xhdpi/widget_resize_handle_left.png
new file mode 100644
index 0000000..40d4e0b
--- /dev/null
+++ b/res/drawable-xhdpi/widget_resize_handle_left.png
Binary files differ
diff --git a/res/drawable-xhdpi/widget_resize_handle_right.png b/res/drawable-xhdpi/widget_resize_handle_right.png
new file mode 100644
index 0000000..5ca6071
--- /dev/null
+++ b/res/drawable-xhdpi/widget_resize_handle_right.png
Binary files differ
diff --git a/res/drawable-xhdpi/widget_resize_handle_top.png b/res/drawable-xhdpi/widget_resize_handle_top.png
new file mode 100644
index 0000000..329559c
--- /dev/null
+++ b/res/drawable-xhdpi/widget_resize_handle_top.png
Binary files differ
diff --git a/res/drawable/all_apps_button.xml b/res/drawable/all_apps_button.xml
deleted file mode 100644
index 9f6b8ac..0000000
--- a/res/drawable/all_apps_button.xml
+++ /dev/null
@@ -1,23 +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.
--->
-
-<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_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/box_launcher_top.xml b/res/drawable/box_launcher_top.xml
deleted file mode 100644
index 20c07c4..0000000
--- a/res/drawable/box_launcher_top.xml
+++ /dev/null
@@ -1,23 +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.
--->
-
-<selector xmlns:android="http://schemas.android.com/apk/res/android">
- <item android:state_pressed="true" android:drawable="@drawable/box_launcher_top_pressed" />
- <item android:state_focused="true" android:state_window_focused="true" android:drawable="@drawable/box_launcher_top_selected" />
- <item android:state_focused="true" android:state_window_focused="false" android:drawable="@drawable/box_launcher_top_normal" />
- <item android:drawable="@drawable/box_launcher_top_normal" />
-</selector>
-
diff --git a/res/drawable/hotseat_browser.xml b/res/drawable/hotseat_browser.xml
deleted file mode 100644
index 3c327bf..0000000
--- a/res/drawable/hotseat_browser.xml
+++ /dev/null
@@ -1,23 +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.
--->
-
-<selector xmlns:android="http://schemas.android.com/apk/res/android">
- <item android:state_pressed="true" android:drawable="@drawable/hotseat_browser_pressed" />
- <item android:state_focused="true" android:state_window_focused="true" android:drawable="@drawable/hotseat_browser_focused" />
- <item android:state_focused="true" android:state_window_focused="false" android:drawable="@drawable/hotseat_browser_normal" />
- <item android:drawable="@drawable/hotseat_browser_normal" />
-</selector>
-
diff --git a/res/drawable/hotseat_phone.xml b/res/drawable/hotseat_phone.xml
deleted file mode 100644
index 318a81e..0000000
--- a/res/drawable/hotseat_phone.xml
+++ /dev/null
@@ -1,23 +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.
--->
-
-<selector xmlns:android="http://schemas.android.com/apk/res/android">
- <item android:state_pressed="true" android:drawable="@drawable/hotseat_phone_pressed" />
- <item android:state_focused="true" android:state_window_focused="true" android:drawable="@drawable/hotseat_phone_focused" />
- <item android:state_focused="true" android:state_window_focused="false" android:drawable="@drawable/hotseat_phone_normal" />
- <item android:drawable="@drawable/hotseat_phone_normal" />
-</selector>
-
diff --git a/res/layout-land/hotseat.xml b/res/layout-land/hotseat.xml
index 79661a7..9dbe234 100644
--- a/res/layout-land/hotseat.xml
+++ b/res/layout-land/hotseat.xml
@@ -30,4 +30,4 @@
launcher:widthGap="-1dp"
launcher:heightGap="-1dp"
launcher:maxGap="@dimen/workspace_max_gap" />
-</com.android.launcher2.Hotseat>
\ No newline at end of file
+</com.android.launcher2.Hotseat>
diff --git a/res/layout-land/launcher.xml b/res/layout-land/launcher.xml
index 4d40ada..215f8db 100644
--- a/res/layout-land/launcher.xml
+++ b/res/layout-land/launcher.xml
@@ -23,11 +23,12 @@
android:layout_height="match_parent">
<include
- android:id="@+id/paged_view_indicator_track"
- layout="@layout/scroll_indicator_track"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_gravity="bottom" />
+ android:id="@+id/dock_divider"
+ layout="@layout/dock_divider"
+ android:layout_width="wrap_content"
+ android:layout_height="match_parent"
+ android:layout_marginRight="@dimen/button_bar_height"
+ android:layout_gravity="right" />
<include
android:id="@+id/paged_view_indicator"
layout="@layout/scroll_indicator"
@@ -45,7 +46,9 @@
launcher:defaultScreen="2"
launcher:cellCountX="4"
launcher:cellCountY="4"
- launcher:pageSpacing="@dimen/workspace_page_spacing">
+ launcher:pageSpacing="@dimen/workspace_page_spacing"
+ launcher:scrollIndicatorPaddingLeft="@dimen/qsb_bar_height"
+ launcher:scrollIndicatorPaddingRight="@dimen/button_bar_height">
<include android:id="@+id/cell1" layout="@layout/workspace_screen" />
<include android:id="@+id/cell2" layout="@layout/workspace_screen" />
@@ -71,6 +74,4 @@
android:layout_width="@dimen/button_bar_height"
android:layout_height="match_parent"
android:layout_gravity="right" />
-
-
</com.android.launcher2.DragLayer>
diff --git a/res/layout-port/hotseat.xml b/res/layout-port/hotseat.xml
index 88dd738..a122abb 100644
--- a/res/layout-port/hotseat.xml
+++ b/res/layout-port/hotseat.xml
@@ -23,6 +23,7 @@
android:id="@+id/layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
+ android:paddingTop="@dimen/button_bar_height_padding"
android:paddingLeft="@dimen/workspace_left_padding"
android:paddingRight="@dimen/workspace_right_padding"
launcher:cellWidth="@dimen/workspace_cell_width"
diff --git a/res/layout-port/launcher.xml b/res/layout-port/launcher.xml
index fc39034..f7e93f0 100644
--- a/res/layout-port/launcher.xml
+++ b/res/layout-port/launcher.xml
@@ -25,12 +25,12 @@
<!-- Keep these behind the workspace so that they are not visible when
we go into AllApps -->
<include
- android:id="@+id/paged_view_indicator_track"
- layout="@layout/scroll_indicator_track"
+ android:id="@+id/dock_divider"
+ layout="@layout/dock_divider"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_gravity="bottom"
- android:layout_marginBottom="@dimen/button_bar_height" />
+ android:layout_marginBottom="@dimen/button_bar_height"
+ android:layout_gravity="bottom" />
<include
android:id="@+id/paged_view_indicator"
layout="@layout/scroll_indicator"
@@ -47,7 +47,9 @@
launcher:defaultScreen="2"
launcher:cellCountX="4"
launcher:cellCountY="4"
- launcher:pageSpacing="@dimen/workspace_page_spacing">
+ launcher:pageSpacing="@dimen/workspace_page_spacing"
+ launcher:scrollIndicatorPaddingLeft="@dimen/dock_divider_padding_left"
+ launcher:scrollIndicatorPaddingRight="@dimen/dock_divider_padding_right">
<include android:id="@+id/cell1" layout="@layout/workspace_screen" />
<include android:id="@+id/cell2" layout="@layout/workspace_screen" />
@@ -71,9 +73,6 @@
<include layout="@layout/hotseat"
android:id="@+id/hotseat"
android:layout_width="match_parent"
- android:layout_height="@dimen/button_bar_height"
+ android:layout_height="@dimen/button_bar_height_plus_padding"
android:layout_gravity="bottom" />
-
-
-
</com.android.launcher2.DragLayer>
diff --git a/res/layout/scroll_indicator_track.xml b/res/layout/dock_divider.xml
similarity index 78%
rename from res/layout/scroll_indicator_track.xml
rename to res/layout/dock_divider.xml
index e3aa625..c3cac52 100644
--- a/res/layout/scroll_indicator_track.xml
+++ b/res/layout/dock_divider.xml
@@ -16,7 +16,9 @@
<ImageView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:launcher="http://schemas.android.com/apk/res/com.android.launcher"
- android:paddingLeft="@dimen/scroll_track_padding_left"
- android:paddingRight="@dimen/scroll_track_padding_right"
+ android:paddingLeft="@dimen/dock_divider_padding_left"
+ android:paddingRight="@dimen/dock_divider_padding_right"
+ android:paddingTop="@dimen/dock_divider_padding_top"
+ android:paddingBottom="@dimen/dock_divider_padding_bottom"
android:scaleType="fitXY"
android:src="@drawable/hotseat_track_holo" />
\ No newline at end of file
diff --git a/res/values-land/dimens.xml b/res/values-land/dimens.xml
index d484393..d8cc7ef 100644
--- a/res/values-land/dimens.xml
+++ b/res/values-land/dimens.xml
@@ -25,8 +25,10 @@
<dimen name="workspace_top_padding">0dp</dimen>
<dimen name="workspace_bottom_padding">0dp</dimen>
<dimen name="workspace_page_spacing">8dp</dimen>
- <dimen name="scroll_track_padding_left">@dimen/qsb_bar_height</dimen>
- <dimen name="scroll_track_padding_right">@dimen/button_bar_height</dimen>
+ <dimen name="dock_divider_padding_left">0dp</dimen>
+ <dimen name="dock_divider_padding_right">0dp</dimen>
+ <dimen name="dock_divider_padding_top">12dp</dimen>
+ <dimen name="dock_divider_padding_bottom">12dp</dimen>
<!-- AppsCustomize -->
<dimen name="apps_customize_cell_width">80dp</dimen>
diff --git a/res/values-land/styles.xml b/res/values-land/styles.xml
index e8d767c..ea79a5a 100644
--- a/res/values-land/styles.xml
+++ b/res/values-land/styles.xml
@@ -55,25 +55,5 @@
<item name="android:paddingTop">5dp</item>
<item name="android:paddingBottom">10dp</item>
</style>
-
- <style name="HotseatButton">
- <item name="android:paddingTop">12dip</item>
- <item name="android:paddingBottom">12dip</item>
- <item name="android:background">@drawable/hotseat_bg_center</item>
- <item name="android:layout_height">wrap_content</item>
- <item name="android:layout_width">fill_parent</item>
- <item name="android:scaleType">center</item>
- <item name="android:focusable">true</item>
- <item name="android:clickable">true</item>
- </style>
- <style name="HotseatButton.Left">
- <item name="android:layout_marginBottom">4dip</item>
- <item name="android:background">@drawable/hotseat_bg_left</item>
- </style>
- <style name="HotseatButton.Right">
- <item name="android:layout_marginTop">4dip</item>
- <item name="android:background">@drawable/hotseat_bg_right</item>
- </style>
-
</resources>
diff --git a/res/values-large/config.xml b/res/values-large/config.xml
index f0ce348..6274364 100644
--- a/res/values-large/config.xml
+++ b/res/values-large/config.xml
@@ -1,4 +1,6 @@
<resources>
+ <bool name="config_largeHeap">true</bool>
+
<!-- AllApps/Customize/AppsCustomize -->
<!-- Out of 100, the percent to shrink the workspace during spring loaded mode. -->
<integer name="config_workspaceSpringLoadShrinkPercentage">90</integer>
diff --git a/res/values/arrays.xml b/res/values/arrays.xml
deleted file mode 100644
index 6bd16ed..0000000
--- a/res/values/arrays.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<resources>
- <string-array name="hotseats" translatable="false">
- <item>intent:#Intent;action=android.intent.action.DIAL;end</item>
- <item>*BROWSER*</item>
- </string-array>
- <array name="hotseat_icons" translatable="false">
- <item>@drawable/hotseat_phone</item>
- <item>@drawable/hotseat_browser</item>
- </array>
-</resources>
diff --git a/res/values/attrs.xml b/res/values/attrs.xml
index e093e36..4359103 100644
--- a/res/values/attrs.xml
+++ b/res/values/attrs.xml
@@ -108,6 +108,9 @@
<attr name="pageLayoutPaddingRight" format="dimension" />
<!-- The space between adjacent pages of the PagedView. -->
<attr name="pageSpacing" format="dimension" />
+ <!-- The padding for the scroll indicator area -->
+ <attr name="scrollIndicatorPaddingLeft" format="dimension" />
+ <attr name="scrollIndicatorPaddingRight" format="dimension" />
</declare-styleable>
<!-- AppsCustomizePagedView specific attributes. These attributes are used to
diff --git a/res/values/config.xml b/res/values/config.xml
index 5ddf0a1..9a2c1f2 100644
--- a/res/values/config.xml
+++ b/res/values/config.xml
@@ -1,5 +1,6 @@
<resources>
<bool name="config_hardwareAccelerated">true</bool>
+ <bool name="config_largeHeap">false</bool>
<!-- AllApps/Customize/AppsCustomize -->
<!-- The alpha of the AppsCustomize bg in spring loaded mode -->
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index 44da352..215f698 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -24,8 +24,10 @@
<dimen name="workspace_max_gap">8dp</dimen>
<dimen name="folder_cell_width">74dp</dimen>
<dimen name="folder_cell_height">80dp</dimen>
- <dimen name="scroll_track_padding_left">12dp</dimen>
- <dimen name="scroll_track_padding_right">12dp</dimen>
+ <dimen name="dock_divider_padding_left">12dp</dimen>
+ <dimen name="dock_divider_padding_right">12dp</dimen>
+ <dimen name="dock_divider_padding_top">0dp</dimen>
+ <dimen name="dock_divider_padding_bottom">0dp</dimen>
<!-- QSB -->
<dimen name="toolbar_button_vertical_padding">0dip</dimen>
@@ -45,6 +47,10 @@
<!-- height of the bottom row of controls -->
<dimen name="button_bar_height">80dip</dimen>
+ <!-- Because portal animations go beyond the bounds of an icon, we need
+ to make the dock layout slightly larger than the button_bar_height -->
+ <dimen name="button_bar_height_padding">8dp</dimen>
+ <dimen name="button_bar_height_plus_padding">88dp</dimen>
<!-- Drag padding to add to the drop targets -->
<dimen name="drop_target_drag_padding">20dp</dimen>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index a3c263d..e8c8d00 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -81,6 +81,9 @@
<string name="menu_item_add_item">Add to Home screen</string>
<!-- Options in "Add to Home" dialog box; Title of the group containing the list of all apps -->
<string name="group_applications">Applications</string>
+ <!-- Options in "Add to Home" dialog box; Title of the group containing the list of all shortcut
+s -->
+ <string name="group_shortcuts">Shortcuts</string>
<!-- Options in "Add to Home" dialog box; Title of the group containing the list of all widgets/gadgets -->
<string name="group_widgets">Widgets</string>
<!-- Options in "Add to Home" dialog box; Title of the group containing the list of apps that can set the wallpaper-->
diff --git a/res/values/styles.xml b/res/values/styles.xml
index 33a1d10..6ed830a 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -65,6 +65,7 @@
<style name="WorkspaceIcon.Landscape.Folder">
<item name="android:drawablePadding">0dp</item>
<item name="android:paddingTop">0dp</item>
+ <item name="android:layout_marginTop">-6dp</item>
</style>
<style name="WorkspaceIcon.Portrait.AppsCustomize">
diff --git a/src/com/android/launcher2/AddAdapter.java b/src/com/android/launcher2/AddAdapter.java
index d1076b1..5b7e92c 100644
--- a/src/com/android/launcher2/AddAdapter.java
+++ b/src/com/android/launcher2/AddAdapter.java
@@ -35,14 +35,14 @@
public class AddAdapter extends BaseAdapter {
private final LayoutInflater mInflater;
-
+
private final ArrayList<ListItem> mItems = new ArrayList<ListItem>();
-
+
public static final int ITEM_SHORTCUT = 0;
public static final int ITEM_APPWIDGET = 1;
public static final int ITEM_APPLICATION = 2;
public static final int ITEM_WALLPAPER = 3;
-
+
/**
* Specific item in our list.
*/
@@ -50,7 +50,7 @@
public final CharSequence text;
public final Drawable image;
public final int actionTag;
-
+
public ListItem(Resources res, int textResourceId, int imageResourceId, int actionTag) {
text = res.getString(textResourceId);
if (imageResourceId != -1) {
@@ -66,16 +66,17 @@
super();
mInflater = (LayoutInflater) launcher.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
-
+
// Create default actions
Resources res = launcher.getResources();
-
+
mItems.add(new ListItem(res, R.string.group_applications,
R.drawable.ic_launcher_application, ITEM_APPLICATION));
mItems.add(new ListItem(res, R.string.group_widgets,
R.drawable.ic_launcher_appwidget, ITEM_APPWIDGET));
-
+ mItems.add(new ListItem(res, R.string.group_shortcuts,
+ R.drawable.ic_launcher_application, ITEM_SHORTCUT));
mItems.add(new ListItem(res, R.string.group_wallpapers,
R.drawable.ic_launcher_wallpaper, ITEM_WALLPAPER));
@@ -83,16 +84,16 @@
public View getView(int position, View convertView, ViewGroup parent) {
ListItem item = (ListItem) getItem(position);
-
+
if (convertView == null) {
convertView = mInflater.inflate(R.layout.add_list_item, parent, false);
}
-
+
TextView textView = (TextView) convertView;
textView.setTag(item);
textView.setText(item.text);
textView.setCompoundDrawablesWithIntrinsicBounds(item.image, null, null, null);
-
+
return convertView;
}
@@ -107,5 +108,4 @@
public long getItemId(int position) {
return position;
}
-
}
diff --git a/src/com/android/launcher2/AppsCustomizePagedView.java b/src/com/android/launcher2/AppsCustomizePagedView.java
index 714e7f9..d07b321 100644
--- a/src/com/android/launcher2/AppsCustomizePagedView.java
+++ b/src/com/android/launcher2/AppsCustomizePagedView.java
@@ -181,6 +181,7 @@
private int mWidgetWidthGap, mWidgetHeightGap;
private int mShortcutCountX, mShortcutCountY;
private int mShortcutWidthGap, mShortcutHeightGap;
+ private int mNumWidgetPages, mNumShortcutPages;
private final int mWidgetPreviewIconPaddedDimension;
private final float sWidgetPreviewIconPaddingPercentage = 0.25f;
private PagedViewCellLayout mWidgetSpacingLayout;
@@ -287,12 +288,16 @@
mShortcutCountX = Math.max(1, (int) Math.round(mCellCountX / 2f));
mShortcutCountY = Math.max(1, (int) Math.round(mCellCountY / 2f));
+ mNumWidgetPages = (int) Math.ceil(mWidgets.size() /
+ (float) (mWidgetCountX * mWidgetCountY));
+ mNumShortcutPages = (int) Math.ceil(mShortcuts.size() /
+ (float) (mShortcutCountX * mShortcutCountY));
+
// Force a measure to update recalculate the gaps
int widthSpec = MeasureSpec.makeMeasureSpec(getMeasuredWidth(), MeasureSpec.AT_MOST);
int heightSpec = MeasureSpec.makeMeasureSpec(getMeasuredHeight(), MeasureSpec.AT_MOST);
mWidgetSpacingLayout.measure(widthSpec, heightSpec);
mContentWidth = mWidgetSpacingLayout.getContentWidth();
-
invalidatePageData();
}
@@ -495,14 +500,20 @@
public void setContentType(ContentType type) {
mContentType = type;
- setCurrentPage(0);
- invalidatePageData();
+ invalidatePageData(0);
}
public boolean isContentType(ContentType type) {
return (mContentType == type);
}
+ public void setCurrentPageToWidgets() {
+ invalidatePageData(0);
+ }
+ public void setCurrentPageToShortcuts() {
+ invalidatePageData(mNumWidgetPages);
+ }
+
/*
* Apps PagedView implementation
*/
@@ -848,14 +859,10 @@
Context context = getContext();
int[] countX = { mWidgetCountX, mShortcutCountX };
int[] countY = { mWidgetCountY, mShortcutCountY };
- Object[] collection = { mWidgets, mShortcuts };
+ int[] numPages = { mNumWidgetPages, mNumShortcutPages };
for (int i = 0; i < 2; ++i) {
- ArrayList<Object> list = (ArrayList<Object>) collection[i];
- int numItemsPerPage = countX[i] * countY[i];
- int numItemPages = (int) Math.ceil(list.size() / (float) numItemsPerPage);
- for (int j = 0; j < numItemPages; ++j) {
- PagedViewGridLayout layout = new PagedViewGridLayout(context, countX[i],
- countY[i]);
+ for (int j = 0; j < numPages[i]; ++j) {
+ PagedViewGridLayout layout = new PagedViewGridLayout(context, countX[i], countY[i]);
setupPage(layout);
addView(layout);
}
@@ -1130,10 +1137,9 @@
// Reset to the first page of the Apps pane
AppsCustomizeTabHost tabs = (AppsCustomizeTabHost)
mLauncher.findViewById(R.id.apps_customize_pane);
- tabs.setCurrentTabByTag(tabs.getTabTagForContentType(ContentType.Applications));
+ tabs.selectAppsTab();
} else if (getCurrentPage() != 0) {
- setCurrentPage(0);
- invalidatePageData();
+ invalidatePageData(0);
}
}
@Override
diff --git a/src/com/android/launcher2/AppsCustomizeTabHost.java b/src/com/android/launcher2/AppsCustomizeTabHost.java
index ed408df..c2d1341 100644
--- a/src/com/android/launcher2/AppsCustomizeTabHost.java
+++ b/src/com/android/launcher2/AppsCustomizeTabHost.java
@@ -52,12 +52,29 @@
}
/**
- * Convenience methods to select specific tabs
+ * Convenience methods to select specific tabs. We want to set the content type immediately
+ * in these cases, but we note that we still call setCurrentTabByTag() so that the tab view
+ * reflects the new content (but doesn't do the animation and logic associated with changing
+ * tabs manually).
*/
+ private void setContentTypeImmediate(AppsCustomizePagedView.ContentType type) {
+ onTabChangedStart();
+ onTabChangedEnd(type);
+ }
void selectAppsTab() {
+ setContentTypeImmediate(AppsCustomizePagedView.ContentType.Applications);
setCurrentTabByTag(APPS_TAB_TAG);
}
void selectWidgetsTab() {
+ setContentTypeImmediate(AppsCustomizePagedView.ContentType.Widgets);
+ mAppsCustomizePane.setCurrentPageToWidgets();
+
+ setCurrentTabByTag(WIDGETS_TAB_TAG);
+ }
+ void selectShortcutsTab() {
+ setContentTypeImmediate(AppsCustomizePagedView.ContentType.Widgets);
+ mAppsCustomizePane.setCurrentPageToShortcuts();
+
setCurrentTabByTag(WIDGETS_TAB_TAG);
}
@@ -135,6 +152,13 @@
return super.onTouchEvent(event);
}
+ private void onTabChangedStart() {
+ mAppsCustomizePane.hideScrollingIndicator(false);
+ }
+ private void onTabChangedEnd(AppsCustomizePagedView.ContentType type) {
+ mAppsCustomizePane.setContentType(type);
+ }
+
@Override
public void onTabChanged(String tabId) {
final AppsCustomizePagedView.ContentType type = getContentTypeForTabTag(tabId);
@@ -148,11 +172,11 @@
anim.addListener(new AnimatorListenerAdapter() {
@Override
public void onAnimationStart(android.animation.Animator animation) {
- mAppsCustomizePane.hideScrollingIndicator(false);
+ onTabChangedStart();
}
@Override
public void onAnimationEnd(android.animation.Animator animation) {
- mAppsCustomizePane.setContentType(type);
+ onTabChangedEnd(type);
ObjectAnimator anim = ObjectAnimator.ofFloat(mAppsCustomizePane, "alpha", 1f);
anim.setDuration(duration);
@@ -206,8 +230,11 @@
/* LauncherTransitionable overrides */
@Override
- public void onLauncherTransitionStart(Animator animation) {
- if (animation != null) {
+ public void onLauncherTransitionStart(Animator animation, boolean toWorkspace) {
+ // isHardwareAccelerated() checks if we're attached to a window and if that
+ // window is HW accelerated-- we were sometimes not attached to a window
+ // and buildLayer was throwing an IllegalStateException
+ if (animation != null && isHardwareAccelerated()) {
// Turn on hardware layers for performance
setLayerType(LAYER_TYPE_HARDWARE, null);
@@ -218,11 +245,13 @@
}
@Override
- public void onLauncherTransitionEnd(Animator animation) {
+ public void onLauncherTransitionEnd(Animator animation, boolean toWorkspace) {
if (animation != null) {
setLayerType(LAYER_TYPE_NONE, null);
}
- mAppsCustomizePane.flashScrollingIndicator();
+ if (!toWorkspace) {
+ mAppsCustomizePane.flashScrollingIndicator();
+ }
}
}
diff --git a/src/com/android/launcher2/HolographicPagedViewIcon.java b/src/com/android/launcher2/HolographicPagedViewIcon.java
index 7123e2a..dda233e 100644
--- a/src/com/android/launcher2/HolographicPagedViewIcon.java
+++ b/src/com/android/launcher2/HolographicPagedViewIcon.java
@@ -48,7 +48,7 @@
int hspace = getWidth() - compoundPaddingRight - compoundPaddingLeft;
canvas.drawBitmap(overlay,
offset + compoundPaddingLeft + (hspace - overlay.getWidth()) / 2,
- mPaddingTop,
+ mOriginalIcon.getPaddingTop(),
mPaint);
}
}
diff --git a/src/com/android/launcher2/Launcher.java b/src/com/android/launcher2/Launcher.java
index af8d986..795d5cc 100644
--- a/src/com/android/launcher2/Launcher.java
+++ b/src/com/android/launcher2/Launcher.java
@@ -282,7 +282,6 @@
Environment.getExternalStorageDirectory() + "/launcher");
}
- loadHotseats();
checkForLocaleChange();
setContentView(R.layout.launcher);
setupViews();
@@ -368,7 +367,6 @@
sLocaleConfiguration.mnc = mnc;
mIconCache.flush();
- loadHotseats();
final LocaleConfiguration localeConfiguration = sLocaleConfiguration;
new Thread("WriteLocaleConfiguration") {
@@ -458,141 +456,6 @@
return Uri.parse(url);
}
- // Load the Intent templates from arrays.xml to populate the hotseats. For
- // each Intent, if it resolves to a single app, use that as the launch
- // intent & use that app's label as the contentDescription. Otherwise,
- // retain the ResolveActivity so the user can pick an app.
- private void loadHotseats() {
- if (mHotseatConfig == null) {
- mHotseatConfig = getResources().getStringArray(R.array.hotseats);
- if (mHotseatConfig.length > 0) {
- mHotseats = new Intent[mHotseatConfig.length];
- mHotseatLabels = new CharSequence[mHotseatConfig.length];
- mHotseatIcons = new Drawable[mHotseatConfig.length];
- } else {
- mHotseats = null;
- mHotseatIcons = null;
- mHotseatLabels = null;
- }
-
- TypedArray hotseatIconDrawables = getResources().obtainTypedArray(R.array.hotseat_icons);
- for (int i=0; i<mHotseatConfig.length; i++) {
- // load icon for this slot; currently unrelated to the actual activity
- try {
- mHotseatIcons[i] = hotseatIconDrawables.getDrawable(i);
- } catch (ArrayIndexOutOfBoundsException ex) {
- Log.w(TAG, "Missing hotseat_icons array item #" + i);
- mHotseatIcons[i] = null;
- }
- }
- hotseatIconDrawables.recycle();
- }
-
- PackageManager pm = getPackageManager();
- for (int i=0; i<mHotseatConfig.length; i++) {
- Intent intent = null;
- if (mHotseatConfig[i].equals("*BROWSER*")) {
- // magic value meaning "launch user's default web browser"
- // replace it with a generic web request so we can see if there is indeed a default
- String defaultUri = getString(R.string.default_browser_url);
- intent = new Intent(
- Intent.ACTION_VIEW,
- ((defaultUri != null)
- ? Uri.parse(defaultUri)
- : getDefaultBrowserUri())
- ).addCategory(Intent.CATEGORY_BROWSABLE);
- // note: if the user launches this without a default set, she
- // will always be taken to the default URL above; this is
- // unavoidable as we must specify a valid URL in order for the
- // chooser to appear, and once the user selects something, that
- // URL is unavoidably sent to the chosen app.
- } else {
- try {
- intent = Intent.parseUri(mHotseatConfig[i], 0);
- } catch (java.net.URISyntaxException ex) {
- Log.w(TAG, "Invalid hotseat intent: " + mHotseatConfig[i]);
- // bogus; leave intent=null
- }
- }
-
- if (intent == null) {
- mHotseats[i] = null;
- mHotseatLabels[i] = getText(R.string.activity_not_found);
- continue;
- }
-
- if (LOGD) {
- Log.d(TAG, "loadHotseats: hotseat " + i
- + " initial intent=["
- + intent.toUri(Intent.URI_INTENT_SCHEME)
- + "]");
- }
-
- ResolveInfo bestMatch = pm.resolveActivity(intent, PackageManager.MATCH_DEFAULT_ONLY);
- List<ResolveInfo> allMatches = pm.queryIntentActivities(intent, PackageManager.MATCH_DEFAULT_ONLY);
- if (LOGD) {
- Log.d(TAG, "Best match for intent: " + bestMatch);
- Log.d(TAG, "All matches: ");
- for (ResolveInfo ri : allMatches) {
- Log.d(TAG, " --> " + ri);
- }
- }
- // did this resolve to a single app, or the resolver?
- if (allMatches.size() == 0 || bestMatch == null) {
- // can't find any activity to handle this. let's leave the
- // intent as-is and let Launcher show a toast when it fails
- // to launch.
- mHotseats[i] = intent;
-
- // set accessibility text to "Not installed"
- mHotseatLabels[i] = getText(R.string.activity_not_found);
- } else {
- boolean found = false;
- for (ResolveInfo ri : allMatches) {
- if (bestMatch.activityInfo.name.equals(ri.activityInfo.name)
- && bestMatch.activityInfo.applicationInfo.packageName
- .equals(ri.activityInfo.applicationInfo.packageName)) {
- found = true;
- break;
- }
- }
-
- if (!found) {
- if (LOGD) Log.d(TAG, "Multiple options, no default yet");
- // the bestMatch is probably the ResolveActivity, meaning the
- // user has not yet selected a default
- // so: we'll keep the original intent for now
- mHotseats[i] = intent;
-
- // set the accessibility text to "Select shortcut"
- mHotseatLabels[i] = getText(R.string.title_select_shortcut);
- } else {
- // we have an app!
- // now reconstruct the intent to launch it through the front
- // door
- ComponentName com = new ComponentName(
- bestMatch.activityInfo.applicationInfo.packageName,
- bestMatch.activityInfo.name);
- mHotseats[i] = new Intent(Intent.ACTION_MAIN).setComponent(com);
-
- // load the app label for accessibility
- mHotseatLabels[i] = bestMatch.activityInfo.loadLabel(pm);
- }
- }
-
- if (LOGD) {
- Log.d(TAG, "loadHotseats: hotseat " + i
- + " final intent=["
- + ((mHotseats[i] == null)
- ? "null"
- : mHotseats[i].toUri(Intent.URI_INTENT_SCHEME))
- + "] label=[" + mHotseatLabels[i]
- + "]"
- );
- }
- }
- }
-
/**
* Returns whether we should delay spring loaded mode -- for shortcuts and widgets that have
* a configuration step, this allows the proper animations to run after other transitions.
@@ -2225,7 +2088,7 @@
alphaAnim.start();
if (toView instanceof LauncherTransitionable) {
- ((LauncherTransitionable) toView).onLauncherTransitionStart(scaleAnim);
+ ((LauncherTransitionable) toView).onLauncherTransitionStart(scaleAnim, false);
}
scaleAnim.addListener(new AnimatorListenerAdapter() {
@Override
@@ -2244,13 +2107,12 @@
toView.setScaleX(1.0f);
toView.setScaleY(1.0f);
if (toView instanceof LauncherTransitionable) {
- ((LauncherTransitionable) toView).onLauncherTransitionEnd(scaleAnim);
+ ((LauncherTransitionable) toView).onLauncherTransitionEnd(scaleAnim, false);
}
if (!springLoaded && !LauncherApplication.isScreenLarge()) {
// Hide the workspace scrollbar
mWorkspace.hideScrollingIndicator(true);
- mWorkspace.hideScrollIndicatorTrack();
}
}
});
@@ -2270,13 +2132,12 @@
toView.setVisibility(View.VISIBLE);
toView.bringToFront();
if (toView instanceof LauncherTransitionable) {
- ((LauncherTransitionable) toView).onLauncherTransitionStart(null);
- ((LauncherTransitionable) toView).onLauncherTransitionEnd(null);
+ ((LauncherTransitionable) toView).onLauncherTransitionStart(null, false);
+ ((LauncherTransitionable) toView).onLauncherTransitionEnd(null, false);
if (!springLoaded && !LauncherApplication.isScreenLarge()) {
// Hide the workspace scrollbar
mWorkspace.hideScrollingIndicator(true);
- mWorkspace.hideScrollIndicatorTrack();
}
}
}
@@ -2327,23 +2188,16 @@
}
});
if (fromView instanceof LauncherTransitionable) {
- ((LauncherTransitionable) fromView).onLauncherTransitionStart(alphaAnim);
+ ((LauncherTransitionable) fromView).onLauncherTransitionStart(alphaAnim, true);
}
alphaAnim.addListener(new AnimatorListenerAdapter() {
@Override
- public void onAnimationStart(android.animation.Animator animation) {
- if (!springLoaded && !LauncherApplication.isScreenLarge()) {
- // Show the workspace scrollbar
- mWorkspace.showScrollIndicatorTrack();
- mWorkspace.flashScrollingIndicator();
- }
- }
- @Override
public void onAnimationEnd(Animator animation) {
fromView.setVisibility(View.GONE);
if (fromView instanceof LauncherTransitionable) {
- ((LauncherTransitionable) fromView).onLauncherTransitionEnd(alphaAnim);
+ ((LauncherTransitionable) fromView).onLauncherTransitionEnd(alphaAnim,true);
}
+ mWorkspace.flashScrollingIndicator();
}
});
@@ -2352,12 +2206,11 @@
} else {
fromView.setVisibility(View.GONE);
if (fromView instanceof LauncherTransitionable) {
- ((LauncherTransitionable) fromView).onLauncherTransitionStart(null);
- ((LauncherTransitionable) fromView).onLauncherTransitionEnd(null);
+ ((LauncherTransitionable) fromView).onLauncherTransitionStart(null, true);
+ ((LauncherTransitionable) fromView).onLauncherTransitionEnd(null, true);
if (!springLoaded && !LauncherApplication.isScreenLarge()) {
- // Show the workspace scrollbar
- mWorkspace.showScrollIndicatorTrack();
+ // Flash the workspace scrollbar
mWorkspace.flashScrollingIndicator();
}
}
@@ -2593,14 +2446,18 @@
ImageView button = (ImageView) findViewById(buttonId);
Drawable toolbarIcon = getExternalPackageToolbarIcon(activityName);
- // If we were unable to find the icon via the meta-data, use a generic one
- if (toolbarIcon == null) {
- button.setImageResource(fallbackDrawableId);
- return null;
- } else {
- button.setImageDrawable(toolbarIcon);
- return toolbarIcon.getConstantState();
+ if (button != null) {
+ // If we were unable to find the icon via the meta-data, use a
+ // generic one
+ if (toolbarIcon == null) {
+ button.setImageResource(fallbackDrawableId);
+ } else {
+ button.setImageDrawable(toolbarIcon);
+ }
}
+
+ return toolbarIcon != null ? toolbarIcon.getConstantState() : null;
+
}
private void updateTextButtonWithDrawable(int buttonId, Drawable.ConstantState d) {
@@ -2702,7 +2559,6 @@
final AlertDialog.Builder builder = new AlertDialog.Builder(Launcher.this,
AlertDialog.THEME_HOLO_DARK);
- builder.setTitle(getString(R.string.menu_item_add_item));
builder.setAdapter(mAdapter, this);
AlertDialog dialog = builder.create();
@@ -2741,7 +2597,7 @@
switch (item.actionTag) {
case AddAdapter.ITEM_SHORTCUT: {
if (mAppsCustomizeTabHost != null) {
- mAppsCustomizeTabHost.selectWidgetsTab();
+ mAppsCustomizeTabHost.selectShortcutsTab();
}
showAllApps(true);
break;
@@ -3128,6 +2984,6 @@
}
interface LauncherTransitionable {
- void onLauncherTransitionStart(Animator animation);
- void onLauncherTransitionEnd(Animator animation);
+ void onLauncherTransitionStart(Animator animation, boolean toWorkspace);
+ void onLauncherTransitionEnd(Animator animation, boolean toWorkspace);
}
diff --git a/src/com/android/launcher2/PagedView.java b/src/com/android/launcher2/PagedView.java
index bed107a..26f0e57 100644
--- a/src/com/android/launcher2/PagedView.java
+++ b/src/com/android/launcher2/PagedView.java
@@ -163,7 +163,8 @@
// Scrolling indicator
private android.animation.ValueAnimator mScrollIndicatorAnimator;
private ImageView mScrollIndicator;
- private ImageView mScrollTrack;
+ private int mScrollIndicatorPaddingLeft;
+ private int mScrollIndicatorPaddingRight;
private boolean mHasScrollIndicator = true;
private static final int sScrollIndicatorFadeInDuration = 150;
private static final int sScrollIndicatorFadeOutDuration = 650;
@@ -203,6 +204,10 @@
R.styleable.PagedView_pageLayoutWidthGap, -1);
mPageLayoutHeightGap = a.getDimensionPixelSize(
R.styleable.PagedView_pageLayoutHeightGap, -1);
+ mScrollIndicatorPaddingLeft =
+ a.getDimensionPixelSize(R.styleable.PagedView_scrollIndicatorPaddingLeft, 0);
+ mScrollIndicatorPaddingRight =
+ a.getDimensionPixelSize(R.styleable.PagedView_scrollIndicatorPaddingRight, 0);
a.recycle();
setHapticFeedbackEnabled(false);
@@ -286,6 +291,7 @@
mCurrentPage = Math.max(0, Math.min(currentPage, getPageCount() - 1));
updateCurrentPageScroll();
+ updateScrollingIndicator();
notifyPageSwitchListener();
invalidate();
}
@@ -1613,6 +1619,9 @@
}
protected void invalidatePageData() {
+ invalidatePageData(-1);
+ }
+ protected void invalidatePageData(int currentPage) {
if (!mIsDataReady) {
return;
}
@@ -1621,6 +1630,16 @@
// Update all the pages
syncPages();
+ // We must force a measure after we've loaded the pages to update the content width and
+ // to determine the full scroll width
+ measure(MeasureSpec.makeMeasureSpec(getMeasuredWidth(), MeasureSpec.EXACTLY),
+ MeasureSpec.makeMeasureSpec(getMeasuredHeight(), MeasureSpec.EXACTLY));
+
+ // Set a new page as the current page if necessary
+ if (currentPage > -1) {
+ setCurrentPage(currentPage);
+ }
+
// Mark each of the pages as dirty
final int count = getChildCount();
mDirtyPageContent.clear();
@@ -1654,14 +1673,16 @@
return !LauncherApplication.isScreenLarge();
}
+ Runnable hideScrollingIndicatorRunnable = new Runnable() {
+ @Override
+ public void run() {
+ hideScrollingIndicator(false);
+ }
+ };
protected void flashScrollingIndicator() {
+ removeCallbacks(hideScrollingIndicatorRunnable);
showScrollingIndicator();
- postDelayed(new Runnable() {
- @Override
- public void run() {
- hideScrollingIndicator(false);
- }
- }, sScrollIndicatorFlashDuration);
+ postDelayed(hideScrollingIndicatorRunnable, sScrollIndicatorFlashDuration);
}
protected void showScrollingIndicator() {
@@ -1741,23 +1762,13 @@
int numPages = getChildCount();
int pageWidth = getMeasuredWidth();
int maxPageWidth = (numPages * getMeasuredWidth()) + ((numPages - 1) * mPageSpacing);
- int trackWidth = pageWidth;
+ int trackWidth = pageWidth - mScrollIndicatorPaddingLeft - mScrollIndicatorPaddingRight;
int indicatorWidth = mScrollIndicator.getMeasuredWidth() -
mScrollIndicator.getPaddingLeft() - mScrollIndicator.getPaddingRight();
- int paddingLeft = 0;
- int paddingRight = 0;
-
- // Get the track properties
- getScrollingIndicatorTrack();
- if (mScrollTrack != null) {
- paddingLeft = mScrollTrack.getPaddingLeft();
- paddingRight = mScrollTrack.getPaddingRight();
- trackWidth = mScrollTrack.getMeasuredWidth() - paddingLeft - paddingRight;
- }
float offset = (float) getScrollX() / maxPageWidth;
int indicatorSpace = trackWidth / numPages;
- int indicatorPos = (int) (offset * trackWidth) + paddingLeft;
+ int indicatorPos = (int) (offset * trackWidth) + mScrollIndicatorPaddingLeft;
if (hasElasticScrollIndicator()) {
if (mScrollIndicator.getMeasuredWidth() != indicatorSpace) {
mScrollIndicator.getLayoutParams().width = indicatorSpace;
@@ -1771,30 +1782,10 @@
mScrollIndicator.invalidate();
}
- private ImageView getScrollingIndicatorTrack() {
- if (mScrollTrack == null) {
- ViewGroup parent = (ViewGroup) getParent();
- mScrollTrack = (ImageView) (parent.findViewById(R.id.paged_view_indicator_track));
- }
- return mScrollTrack;
- }
-
public void showScrollIndicatorTrack() {
- if (!isScrollingIndicatorEnabled()) return;
-
- getScrollingIndicatorTrack();
- if (mScrollTrack != null) {
- mScrollTrack.setVisibility(View.VISIBLE);
- }
}
public void hideScrollIndicatorTrack() {
- if (!isScrollingIndicatorEnabled()) return;
-
- getScrollingIndicatorTrack();
- if (mScrollTrack != null) {
- mScrollTrack.setVisibility(View.GONE);
- }
}
/* Accessibility */
diff --git a/src/com/android/launcher2/Workspace.java b/src/com/android/launcher2/Workspace.java
index 035d9ea..a198c6d 100644
--- a/src/com/android/launcher2/Workspace.java
+++ b/src/com/android/launcher2/Workspace.java
@@ -1369,16 +1369,12 @@
final int screenCount = getChildCount();
float totalWidth = screenCount * scaledPageWidth + (screenCount - 1) * extraScaledSpacing;
+ // We shrink and disappear to nothing
boolean isPortrait = getMeasuredHeight() > getMeasuredWidth();
- float y = (isPortrait ?
+ float y = screenHeight - scaledPageHeight - (isPortrait ?
getResources().getDimension(R.dimen.allAppsSmallScreenVerticalMarginPortrait) :
getResources().getDimension(R.dimen.allAppsSmallScreenVerticalMarginLandscape));
- float finalAlpha = 1.0f;
- float extraShrinkFactor = 1.0f;
-
- // We shrink and disappear to nothing
- y = screenHeight - y - scaledPageHeight;
- finalAlpha = 0.0f;
+ float finalAlpha = 0.0f;
int duration = res.getInteger(R.integer.config_appsCustomizeWorkspaceShrinkTime);
@@ -1402,7 +1398,6 @@
mUnshrinkAnimationEnabled = false;
mShrinkAnimationEnabled = true;
- final int childCount = getChildCount();
initAnimationArrays();
for (int i = 0; i < screenCount; i++) {
@@ -1428,17 +1423,17 @@
mOldRotationYs[i] = cl.getRotationY();
mNewTranslationXs[i] = x;
mNewTranslationYs[i] = y;
- mNewScaleXs[i] = shrinkFactor * rotationScaleX * extraShrinkFactor;
- mNewScaleYs[i] = shrinkFactor * rotationScaleY * extraShrinkFactor;
+ mNewScaleXs[i] = shrinkFactor * rotationScaleX;
+ mNewScaleYs[i] = shrinkFactor * rotationScaleY;
mNewBackgroundAlphas[i] = finalAlpha;
mNewRotationYs[i] = rotation;
} else {
cl.setX((int)x);
cl.setY((int)y);
- cl.setScaleX(shrinkFactor * rotationScaleX * extraShrinkFactor);
- cl.setScaleY(shrinkFactor * rotationScaleY * extraShrinkFactor);
+ cl.setScaleX(shrinkFactor * rotationScaleX);
+ cl.setScaleY(shrinkFactor * rotationScaleY);
cl.setBackgroundAlpha(finalAlpha);
- cl.setAlpha(finalAlpha);
+ cl.setFastAlpha(finalAlpha);
cl.setRotationY(rotation);
mShrinkAnimationListener.onAnimationEnd(null);
}
@@ -1531,6 +1526,13 @@
showBackgroundGradientForAllApps();
}
+ @Override
+ protected void updateAdjacentPagesAlpha() {
+ if (!isSmall()) {
+ super.updateAdjacentPagesAlpha();
+ }
+ }
+
/*
* This interpolator emulates the rate at which the perceived scale of an object changes
* as its distance from a camera increases. When this interpolator is applied to a scale
@@ -3143,7 +3145,6 @@
mSpringLoadedDragController = new SpringLoadedDragController(mLauncher);
mDragController = dragController;
-
// hardware layers on children are enabled on startup, but should be disabled until
// needed
updateChildrenLayersEnabled();