summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--res/drawable-sw600dp-hdpi/ic_allapps.pngbin0 -> 8906 bytes
-rw-r--r--res/drawable-sw600dp-hdpi/ic_allapps_pressed.pngbin0 -> 10451 bytes
-rw-r--r--res/drawable-sw600dp-mdpi/ic_allapps.pngbin0 -> 5271 bytes
-rw-r--r--res/drawable-sw600dp-mdpi/ic_allapps_pressed.pngbin0 -> 9048 bytes
-rw-r--r--res/drawable-sw600dp-xhdpi/ic_allapps.pngbin0 -> 12289 bytes
-rw-r--r--res/drawable-sw600dp-xhdpi/ic_allapps_pressed.pngbin0 -> 13531 bytes
-rw-r--r--res/layout-land/hotseat.xml2
-rw-r--r--res/layout-land/launcher.xml4
-rw-r--r--res/layout-port/hotseat.xml2
-rw-r--r--res/layout-port/launcher.xml4
-rw-r--r--res/layout-sw720dp-land/application.xml (renamed from res/layout-sw600dp-land/application.xml)0
-rw-r--r--res/layout-sw720dp-port/application.xml (renamed from res/layout-sw600dp-port/application.xml)0
-rw-r--r--res/layout-sw720dp-port/folder_cling.xml (renamed from res/layout-sw600dp-port/folder_cling.xml)0
-rw-r--r--res/layout-sw720dp-port/workspace_cling.xml (renamed from res/layout-sw600dp-port/workspace_cling.xml)0
-rw-r--r--res/layout-sw720dp/all_apps_cling.xml (renamed from res/layout-sw600dp/all_apps_cling.xml)0
-rw-r--r--res/layout-sw720dp/external_widget_drop_list_item.xml (renamed from res/layout-sw600dp/external_widget_drop_list_item.xml)0
-rw-r--r--res/layout-sw720dp/folder_cling.xml (renamed from res/layout-sw600dp/folder_cling.xml)0
-rw-r--r--res/layout-sw720dp/launcher.xml (renamed from res/layout-sw600dp/launcher.xml)0
-rw-r--r--res/layout-sw720dp/market_button.xml (renamed from res/layout-sw600dp/market_button.xml)0
-rw-r--r--res/layout-sw720dp/search_bar.xml (renamed from res/layout-sw600dp/search_bar.xml)0
-rw-r--r--res/layout-sw720dp/wallpaper_item.xml (renamed from res/layout-sw600dp/wallpaper_item.xml)0
-rw-r--r--res/layout-sw720dp/workspace.xml (renamed from res/layout-sw600dp/workspace.xml)0
-rw-r--r--res/layout-sw720dp/workspace_cling.xml (renamed from res/layout-sw600dp/workspace_cling.xml)0
-rw-r--r--res/layout-sw720dp/workspace_screen.xml (renamed from res/layout-sw600dp/workspace_screen.xml)0
-rw-r--r--res/values-sw340dp-land/dimens.xml18
-rw-r--r--res/values-sw340dp-port/dimens.xml22
-rw-r--r--res/values-sw340dp/dimens.xml24
-rw-r--r--res/values-sw600dp-land/dimens.xml39
-rw-r--r--res/values-sw600dp-port/dimens.xml34
-rw-r--r--res/values-sw600dp/config.xml21
-rw-r--r--res/values-sw600dp/dimens.xml76
-rw-r--r--res/values-sw720dp-land/dimens.xml29
-rw-r--r--res/values-sw720dp-port/dimens.xml26
-rw-r--r--res/values-sw720dp-port/styles.xml (renamed from res/values-sw600dp-port/styles.xml)0
-rw-r--r--res/values-sw720dp/config.xml22
-rw-r--r--res/values-sw720dp/dimens.xml49
-rw-r--r--res/values-sw720dp/styles.xml (renamed from res/values-sw600dp/styles.xml)0
-rw-r--r--res/values-sw720dp/wallpapers.xml (renamed from res/values-sw600dp/wallpapers.xml)0
-rw-r--r--res/values/colors.xml1
-rw-r--r--res/values/config.xml6
-rw-r--r--res/values/dimens.xml3
-rw-r--r--res/values/styles.xml6
-rw-r--r--src/com/android/launcher2/BubbleTextView.java9
-rw-r--r--src/com/android/launcher2/CellLayout.java70
-rw-r--r--src/com/android/launcher2/Hotseat.java14
-rw-r--r--src/com/android/launcher2/Launcher.java4
-rw-r--r--src/com/android/launcher2/LauncherApplication.java7
-rw-r--r--src/com/android/launcher2/LauncherModel.java3
-rw-r--r--src/com/android/launcher2/LauncherProvider.java6
-rw-r--r--src/com/android/launcher2/Utilities.java1
-rw-r--r--src/com/android/launcher2/Workspace.java7
51 files changed, 321 insertions, 188 deletions
diff --git a/res/drawable-sw600dp-hdpi/ic_allapps.png b/res/drawable-sw600dp-hdpi/ic_allapps.png
new file mode 100644
index 0000000..323d8a2
--- /dev/null
+++ b/res/drawable-sw600dp-hdpi/ic_allapps.png
Binary files differ
diff --git a/res/drawable-sw600dp-hdpi/ic_allapps_pressed.png b/res/drawable-sw600dp-hdpi/ic_allapps_pressed.png
new file mode 100644
index 0000000..61f644e
--- /dev/null
+++ b/res/drawable-sw600dp-hdpi/ic_allapps_pressed.png
Binary files differ
diff --git a/res/drawable-sw600dp-mdpi/ic_allapps.png b/res/drawable-sw600dp-mdpi/ic_allapps.png
new file mode 100644
index 0000000..198ffdb
--- /dev/null
+++ b/res/drawable-sw600dp-mdpi/ic_allapps.png
Binary files differ
diff --git a/res/drawable-sw600dp-mdpi/ic_allapps_pressed.png b/res/drawable-sw600dp-mdpi/ic_allapps_pressed.png
new file mode 100644
index 0000000..434f10c
--- /dev/null
+++ b/res/drawable-sw600dp-mdpi/ic_allapps_pressed.png
Binary files differ
diff --git a/res/drawable-sw600dp-xhdpi/ic_allapps.png b/res/drawable-sw600dp-xhdpi/ic_allapps.png
new file mode 100644
index 0000000..776225d
--- /dev/null
+++ b/res/drawable-sw600dp-xhdpi/ic_allapps.png
Binary files differ
diff --git a/res/drawable-sw600dp-xhdpi/ic_allapps_pressed.png b/res/drawable-sw600dp-xhdpi/ic_allapps_pressed.png
new file mode 100644
index 0000000..d06c8c3
--- /dev/null
+++ b/res/drawable-sw600dp-xhdpi/ic_allapps_pressed.png
Binary files differ
diff --git a/res/layout-land/hotseat.xml b/res/layout-land/hotseat.xml
index c0c87af..6802ea0 100644
--- a/res/layout-land/hotseat.xml
+++ b/res/layout-land/hotseat.xml
@@ -18,7 +18,7 @@
xmlns:launcher="http://schemas.android.com/apk/res/com.android.launcher"
android:background="@drawable/hotseat_bg_panel"
launcher:cellCountX="1"
- launcher:cellCountY="5">
+ launcher:cellCountY="@integer/hotseat_cell_count">
<com.android.launcher2.CellLayout
android:id="@+id/layout"
android:layout_width="wrap_content"
diff --git a/res/layout-land/launcher.xml b/res/layout-land/launcher.xml
index c11c788..0c1a195 100644
--- a/res/layout-land/launcher.xml
+++ b/res/layout-land/launcher.xml
@@ -30,8 +30,8 @@
android:paddingLeft="@dimen/qsb_bar_height"
android:paddingRight="@dimen/button_bar_height"
launcher:defaultScreen="2"
- launcher:cellCountX="4"
- launcher:cellCountY="4"
+ launcher:cellCountX="@integer/cell_count_x"
+ launcher:cellCountY="@integer/cell_count_y"
launcher:pageSpacing="@dimen/workspace_page_spacing"
launcher:scrollIndicatorPaddingLeft="@dimen/qsb_bar_height"
launcher:scrollIndicatorPaddingRight="@dimen/button_bar_height">
diff --git a/res/layout-port/hotseat.xml b/res/layout-port/hotseat.xml
index 035d958..b937043 100644
--- a/res/layout-port/hotseat.xml
+++ b/res/layout-port/hotseat.xml
@@ -17,7 +17,7 @@
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:launcher="http://schemas.android.com/apk/res/com.android.launcher"
android:background="@drawable/hotseat_bg_panel"
- launcher:cellCountX="5"
+ launcher:cellCountX="@integer/hotseat_cell_count"
launcher:cellCountY="1">
<com.android.launcher2.CellLayout
android:id="@+id/layout"
diff --git a/res/layout-port/launcher.xml b/res/layout-port/launcher.xml
index d7b3fee..f6ff2e8 100644
--- a/res/layout-port/launcher.xml
+++ b/res/layout-port/launcher.xml
@@ -47,8 +47,8 @@
android:paddingTop="@dimen/qsb_bar_height_inset"
android:paddingBottom="@dimen/button_bar_height"
launcher:defaultScreen="2"
- launcher:cellCountX="4"
- launcher:cellCountY="4"
+ launcher:cellCountX="@integer/cell_count_x"
+ launcher:cellCountY="@integer/cell_count_y"
launcher:pageSpacing="@dimen/workspace_page_spacing"
launcher:scrollIndicatorPaddingLeft="@dimen/workspace_divider_padding_left"
launcher:scrollIndicatorPaddingRight="@dimen/workspace_divider_padding_right">
diff --git a/res/layout-sw600dp-land/application.xml b/res/layout-sw720dp-land/application.xml
index 9393f7e..9393f7e 100644
--- a/res/layout-sw600dp-land/application.xml
+++ b/res/layout-sw720dp-land/application.xml
diff --git a/res/layout-sw600dp-port/application.xml b/res/layout-sw720dp-port/application.xml
index af7a8a4..af7a8a4 100644
--- a/res/layout-sw600dp-port/application.xml
+++ b/res/layout-sw720dp-port/application.xml
diff --git a/res/layout-sw600dp-port/folder_cling.xml b/res/layout-sw720dp-port/folder_cling.xml
index 017d0fd..017d0fd 100644
--- a/res/layout-sw600dp-port/folder_cling.xml
+++ b/res/layout-sw720dp-port/folder_cling.xml
diff --git a/res/layout-sw600dp-port/workspace_cling.xml b/res/layout-sw720dp-port/workspace_cling.xml
index 2eae0fc..2eae0fc 100644
--- a/res/layout-sw600dp-port/workspace_cling.xml
+++ b/res/layout-sw720dp-port/workspace_cling.xml
diff --git a/res/layout-sw600dp/all_apps_cling.xml b/res/layout-sw720dp/all_apps_cling.xml
index 7079b21..7079b21 100644
--- a/res/layout-sw600dp/all_apps_cling.xml
+++ b/res/layout-sw720dp/all_apps_cling.xml
diff --git a/res/layout-sw600dp/external_widget_drop_list_item.xml b/res/layout-sw720dp/external_widget_drop_list_item.xml
index 84f40ed..84f40ed 100644
--- a/res/layout-sw600dp/external_widget_drop_list_item.xml
+++ b/res/layout-sw720dp/external_widget_drop_list_item.xml
diff --git a/res/layout-sw600dp/folder_cling.xml b/res/layout-sw720dp/folder_cling.xml
index 4188804..4188804 100644
--- a/res/layout-sw600dp/folder_cling.xml
+++ b/res/layout-sw720dp/folder_cling.xml
diff --git a/res/layout-sw600dp/launcher.xml b/res/layout-sw720dp/launcher.xml
index 65149f2..65149f2 100644
--- a/res/layout-sw600dp/launcher.xml
+++ b/res/layout-sw720dp/launcher.xml
diff --git a/res/layout-sw600dp/market_button.xml b/res/layout-sw720dp/market_button.xml
index 7eaeafa..7eaeafa 100644
--- a/res/layout-sw600dp/market_button.xml
+++ b/res/layout-sw720dp/market_button.xml
diff --git a/res/layout-sw600dp/search_bar.xml b/res/layout-sw720dp/search_bar.xml
index 55ec959..55ec959 100644
--- a/res/layout-sw600dp/search_bar.xml
+++ b/res/layout-sw720dp/search_bar.xml
diff --git a/res/layout-sw600dp/wallpaper_item.xml b/res/layout-sw720dp/wallpaper_item.xml
index 9461e3b..9461e3b 100644
--- a/res/layout-sw600dp/wallpaper_item.xml
+++ b/res/layout-sw720dp/wallpaper_item.xml
diff --git a/res/layout-sw600dp/workspace.xml b/res/layout-sw720dp/workspace.xml
index 327afaf..327afaf 100644
--- a/res/layout-sw600dp/workspace.xml
+++ b/res/layout-sw720dp/workspace.xml
diff --git a/res/layout-sw600dp/workspace_cling.xml b/res/layout-sw720dp/workspace_cling.xml
index 264b1e0..264b1e0 100644
--- a/res/layout-sw600dp/workspace_cling.xml
+++ b/res/layout-sw720dp/workspace_cling.xml
diff --git a/res/layout-sw600dp/workspace_screen.xml b/res/layout-sw720dp/workspace_screen.xml
index 52f9def..52f9def 100644
--- a/res/layout-sw600dp/workspace_screen.xml
+++ b/res/layout-sw720dp/workspace_screen.xml
diff --git a/res/values-sw340dp-land/dimens.xml b/res/values-sw340dp-land/dimens.xml
index ff2e237..facbf56 100644
--- a/res/values-sw340dp-land/dimens.xml
+++ b/res/values-sw340dp-land/dimens.xml
@@ -19,26 +19,8 @@
<dimen name="folderClingMarginTop">50dp</dimen>
<!-- Workspace -->
- <dimen name="workspace_width_gap">0dp</dimen>
- <dimen name="workspace_height_gap">0dp</dimen>
- <dimen name="workspace_top_padding">8dp</dimen>
- <dimen name="workspace_bottom_padding">8dp</dimen>
- <dimen name="workspace_left_padding">8dp</dimen>
- <dimen name="workspace_right_padding">8dp</dimen>
<dimen name="workspace_divider_padding_top">6dp</dimen>
<dimen name="workspace_divider_padding_bottom">6dp</dimen>
- <dimen name="hotseat_width_gap">0dp</dimen>
- <dimen name="hotseat_height_gap">0dp</dimen>
-
<dimen name="qsb_bar_height">48dp</dimen>
- <!-- 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_top_padding">8dp</dimen>
- <dimen name="button_bar_height_bottom_padding">8dp</dimen>
- <dimen name="button_bar_width_left_padding">8dp</dimen>
- <dimen name="button_bar_width_right_padding">8dp</dimen>
- <dimen name="button_bar_height_plus_padding">80dp</dimen>
</resources>
diff --git a/res/values-sw340dp-port/dimens.xml b/res/values-sw340dp-port/dimens.xml
index bf7ebc3..18f2831 100644
--- a/res/values-sw340dp-port/dimens.xml
+++ b/res/values-sw340dp-port/dimens.xml
@@ -19,22 +19,9 @@
<dimen name="folderClingMarginTop">70dp</dimen>
<!-- Workspace -->
- <dimen name="workspace_width_gap">0dp</dimen>
- <dimen name="workspace_height_gap">0dp</dimen>
- <dimen name="workspace_top_padding">8dp</dimen>
- <dimen name="workspace_bottom_padding">8dp</dimen>
- <dimen name="workspace_left_padding">8dp</dimen>
- <dimen name="workspace_right_padding">8dp</dimen>
<dimen name="workspace_divider_padding_left">6dp</dimen>
<dimen name="workspace_divider_padding_right">6dp</dimen>
- <dimen name="hotseat_width_gap">0dp</dimen>
- <dimen name="hotseat_height_gap">0dp</dimen>
- <dimen name="hotseat_top_padding">-1dp</dimen>
- <dimen name="hotseat_bottom_padding">-1dp</dimen>
- <dimen name="hotseat_left_padding">-1dp</dimen>
- <dimen name="hotseat_right_padding">-1dp</dimen>
-
<!-- qsb_bar_height_inset represents qsb_bar_height minus the padding
that we put on each page for allowing folders to draw out of bounds -->
<dimen name="qsb_bar_height_inset">48dp</dimen>
@@ -42,15 +29,6 @@
<dimen name="qsb_padding_left">6dp</dimen>
<dimen name="qsb_padding_right">6dp</dimen>
<dimen name="search_bar_height">48dp</dimen>
- <!-- 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_top_padding">8dp</dimen>
- <dimen name="button_bar_height_bottom_padding">8dp</dimen>
- <dimen name="button_bar_width_left_padding">8dp</dimen>
- <dimen name="button_bar_width_right_padding">8dp</dimen>
- <dimen name="button_bar_height_plus_padding">80dp</dimen>
<!-- AppsCustomize -->
<dimen name="apps_customize_pageLayoutPaddingTop">16dp</dimen>
diff --git a/res/values-sw340dp/dimens.xml b/res/values-sw340dp/dimens.xml
index 69d6e58..d261569 100644
--- a/res/values-sw340dp/dimens.xml
+++ b/res/values-sw340dp/dimens.xml
@@ -17,4 +17,28 @@
<resources>
<!-- Drag padding to add to the bottom of drop targets -->
<dimen name="drop_target_drag_padding">20dp</dimen>
+
+<!-- Workspace -->
+ <dimen name="workspace_width_gap">0dp</dimen>
+ <dimen name="workspace_height_gap">0dp</dimen>
+ <dimen name="workspace_top_padding">8dp</dimen>
+ <dimen name="workspace_bottom_padding">8dp</dimen>
+ <dimen name="workspace_left_padding">8dp</dimen>
+ <dimen name="workspace_right_padding">8dp</dimen>
+
+<!-- Hotseat -->
+ <dimen name="hotseat_width_gap">0dp</dimen>
+ <dimen name="hotseat_height_gap">0dp</dimen>
+ <dimen name="hotseat_top_padding">-1dp</dimen>
+ <dimen name="hotseat_bottom_padding">-1dp</dimen>
+ <dimen name="hotseat_left_padding">-1dp</dimen>
+ <dimen name="hotseat_right_padding">-1dp</dimen>
+ <!-- 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_bottom_padding">8dp</dimen>
+ <dimen name="button_bar_width_left_padding">8dp</dimen>
+ <dimen name="button_bar_width_right_padding">8dp</dimen>
+ <dimen name="button_bar_height_plus_padding">80dp</dimen>
</resources>
diff --git a/res/values-sw600dp-land/dimens.xml b/res/values-sw600dp-land/dimens.xml
index 42c4353..0e7d63c 100644
--- a/res/values-sw600dp-land/dimens.xml
+++ b/res/values-sw600dp-land/dimens.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2010 The Android Open Source Project
+<!-- 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.
@@ -15,33 +15,28 @@
-->
<resources>
+ <dimen name="app_icon_size">65dp</dimen>
+ <dimen name="app_icon_padding_top">2dp</dimen>
+
+<!-- Hotseat -->
+ <dimen name="hotseat_cell_width">75dp</dimen>
+ <dimen name="hotseat_cell_height">85dp</dimen>
+
<!-- Workspace -->
- <dimen name="workspace_left_padding">24dip</dimen>
- <dimen name="workspace_right_padding">24dip</dimen>
- <!-- We need padding on the screens for portals to look right -->
- <dimen name="workspace_top_padding">12dip</dimen>
- <dimen name="workspace_bottom_padding">12dip</dimen>
+ <dimen name="workspace_cell_width">96dp</dimen>
+ <dimen name="workspace_cell_height">86dp</dimen>
<dimen name="workspace_width_gap">32dp</dimen>
- <dimen name="workspace_height_gap">2dp</dimen>
- <dimen name="workspace_page_spacing">50dp</dimen>
+ <dimen name="workspace_height_gap">0dp</dimen>
- <!-- the area at the edge of the screen that makes the workspace go left
- or right while you're dragging. -->
- <dimen name="scroll_zone">100dip</dimen>
+<!-- Folders -->
+ <!-- The size of the image which sits behind the preview of the folder contents -->
+ <dimen name="folder_preview_size">70dp</dimen>
+ <dimen name="folder_cell_width">86dp</dimen>
+ <dimen name="folder_cell_height">86dp</dimen>
+<!-- AppsCustomize -->
<dimen name="apps_customize_pageLayoutWidthGap">36dp</dimen>
<dimen name="apps_customize_pageLayoutHeightGap">8dp</dimen>
<dimen name="apps_customize_pageLayoutPaddingTop">20dp</dimen>
<dimen name="apps_customize_pageLayoutPaddingBottom">14dp</dimen>
- <dimen name="apps_customize_pageLayoutPaddingLeft">30dp</dimen>
- <dimen name="apps_customize_pageLayoutPaddingRight">30dp</dimen>
- <integer name="apps_customize_widget_cell_count_x">3</integer>
- <integer name="apps_customize_widget_cell_count_y">2</integer>
- <integer name="apps_customize_cling_focused_x">4</integer>
- <integer name="apps_customize_cling_focused_y">2</integer>
-
-<!-- Cling -->
- <!-- The offset for the text in the cling -->
- <dimen name="cling_text_block_offset_x">140dp</dimen>
- <dimen name="cling_text_block_offset_y">80dp</dimen>
</resources>
diff --git a/res/values-sw600dp-port/dimens.xml b/res/values-sw600dp-port/dimens.xml
index 5de73b6..8e8455d 100644
--- a/res/values-sw600dp-port/dimens.xml
+++ b/res/values-sw600dp-port/dimens.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2010 The Android Open Source Project
+<!-- 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.
@@ -15,36 +15,20 @@
-->
<resources>
-<!-- AppsCustomize -->
- <dimen name="apps_customize_cell_width">96dp</dimen>
- <dimen name="apps_customize_cell_height">96dp</dimen>
-
<!-- Workspace -->
- <!-- the area at the edge of the screen that makes the workspace go left
- or right while you're dragging. -->
- <dimen name="scroll_zone">40dp</dimen>
-
- <dimen name="workspace_left_padding">15dip</dimen>
- <dimen name="workspace_right_padding">15dip</dimen>
- <dimen name="workspace_top_padding">25dip</dimen>
- <dimen name="workspace_bottom_padding">25dip</dimen>
<dimen name="workspace_width_gap">0dp</dimen>
<dimen name="workspace_height_gap">32dp</dimen>
- <dimen name="workspace_page_spacing">16dp</dimen>
+<!-- AppsCustomize -->
+ <dimen name="apps_customize_cell_width">96dp</dimen>
+ <dimen name="apps_customize_cell_height">96dp</dimen>
<dimen name="apps_customize_pageLayoutWidthGap">24dp</dimen>
<dimen name="apps_customize_pageLayoutHeightGap">36dp</dimen>
<dimen name="apps_customize_pageLayoutPaddingTop">25dp</dimen>
<dimen name="apps_customize_pageLayoutPaddingBottom">10dp</dimen>
- <dimen name="apps_customize_pageLayoutPaddingLeft">30dp</dimen>
- <dimen name="apps_customize_pageLayoutPaddingRight">30dp</dimen>
- <integer name="apps_customize_widget_cell_count_x">2</integer>
- <integer name="apps_customize_widget_cell_count_y">3</integer>
- <integer name="apps_customize_cling_focused_x">2</integer>
- <integer name="apps_customize_cling_focused_y">2</integer>
-<!-- Cling -->
- <!-- The offset for the text in the cling -->
- <dimen name="cling_text_block_offset_x">80dp</dimen>
- <dimen name="cling_text_block_offset_y">160dp</dimen>
-</resources> \ No newline at end of file
+<!-- Hotseat -->
+ <dimen name="hotseat_cell_width">75dp</dimen>
+ <dimen name="hotseat_cell_height">75dp</dimen>
+
+</resources>
diff --git a/res/values-sw600dp/config.xml b/res/values-sw600dp/config.xml
index d97e3c2..a701e69 100644
--- a/res/values-sw600dp/config.xml
+++ b/res/values-sw600dp/config.xml
@@ -1,21 +1,12 @@
<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>
-
-<!-- Workspace -->
- <!-- Whether or not the drop targets drop down as opposed to fade in -->
- <bool name="config_useDropTargetDownTransition">true</bool>
- <!-- Whether or not to fade the side pages -->
- <bool name="config_workspaceFadeAdjacentScreens">true</bool>
-
- <!-- When shrinking the workspace, this is the percentage of its original size. -->
- <integer name="config_workspaceShrinkPercent">17</integer>
+ <integer name="cell_count_x">6</integer>
+ <integer name="cell_count_y">6</integer>
+ <integer name="hotseat_cell_count">7</integer>
+ <integer name="hotseat_all_apps_index">3</integer>
+<!-- Folders -->
<!-- Folder max bounds and max number of items. Note: folder_max_count_x * folder_max_count_y
- >= folder_max_num_items. When these are set to -1, they are automatically determined. -->
+ >= folder_max_num_items. When these are set to -1, they are automatically determined. -->
<integer name="folder_max_count_x">-1</integer>
<integer name="folder_max_count_y">-1</integer>
<integer name="folder_max_num_items">-1</integer>
diff --git a/res/values-sw600dp/dimens.xml b/res/values-sw600dp/dimens.xml
index 9c2046b..a0d7ec8 100644
--- a/res/values-sw600dp/dimens.xml
+++ b/res/values-sw600dp/dimens.xml
@@ -15,65 +15,39 @@
-->
<resources>
-<!-- QSB -->
- <dimen name="toolbar_button_vertical_padding">12dip</dimen>
- <dimen name="toolbar_button_horizontal_padding">12dip</dimen>
+ <dimen name="app_icon_size">72dp</dimen>
+ <integer name="app_icon_hotseat_scale_percent">78</integer>
+ <dimen name="app_icon_drawable_padding">3dp</dimen>
+ <dimen name="app_icon_padding_top">4dp</dimen>
<!-- Workspace -->
- <dimen name="qsb_bar_height">56dp</dimen>
- <!-- This should be @dimen/qsb_bar_height - @dimen/workspace_top_padding
- to fix the extra space given to draw portals -->
- <dimen name="workspace_content_large_only_top_margin">36dp</dimen>
- <dimen name="workspace_cell_width">96dip</dimen>
- <dimen name="workspace_cell_height">96dip</dimen>
+ <dimen name="workspace_cell_width">96dp</dimen>
+ <dimen name="workspace_cell_height">96dp</dimen>
+
+<!-- Hotseat -->
+ <dimen name="hotseat_width_gap">-1dp</dimen>
+ <dimen name="hotseat_height_gap">-1dp</dimen>
+ <dimen name="button_bar_height">94dip</dimen>
+ <dimen name="button_bar_height_bottom_padding">9dp</dimen>
+ <dimen name="button_bar_height_top_padding">9dp</dimen>
+ <dimen name="button_bar_width_left_padding">9dp</dimen>
+ <dimen name="button_bar_width_right_padding">9dp</dimen>
+ <dimen name="button_bar_height_plus_padding">94dp</dimen>
+
+<!-- Folders -->
+ <!-- The size of the image which sits behind the preview of the folder contents -->
+ <dimen name="folder_preview_size">75dp</dimen>
<dimen name="folder_cell_width">96dp</dimen>
<dimen name="folder_cell_height">96dp</dimen>
-
- <dimen name="app_icon_padding_top">4dp</dimen>
+ <dimen name="folder_icon_padding_top">0dp</dimen>
<!-- AppsCustomize -->
- <dimen name="apps_customize_tab_bar_height">60dp</dimen>
- <dimen name="apps_customize_tab_bar_margin_top">8dp</dimen>
<dimen name="apps_customize_cell_width">96dp</dimen>
<dimen name="apps_customize_cell_height">98dp</dimen>
+ <dimen name="apps_customize_pageLayoutPaddingLeft">10dp</dimen>
+ <dimen name="apps_customize_pageLayoutPaddingRight">10dp</dimen>
+ <dimen name="apps_customize_tab_bar_height">60dp</dimen>
+ <dimen name="apps_customize_tab_bar_margin_top">8dp</dimen>
<dimen name="apps_customize_widget_cell_width_gap">36dp</dimen>
<dimen name="apps_customize_widget_cell_height_gap">36dp</dimen>
-
- <!-- The corner radius to draw the external drop icon rounded rect -->
- <dimen name="external_drop_icon_rect_radius">10dp</dimen>
-
- <!-- Size of icons in workspace -->
- <dimen name="app_icon_size">72dp</dimen>
-
- <!-- extra horizontal spacing between mini screen thumbnails ie. in all
- apps and in customization mode -->
- <dimen name="smallScreenExtraSpacing">0dip</dimen>
-
- <!-- Vertical spacing between edge of screen and mini cell layouts when they
- are minimized to the bottom in all apps -->
- <dimen name="allAppsSmallScreenVerticalMarginLandscape">30dip</dimen>
- <dimen name="allAppsSmallScreenVerticalMarginPortrait">60dip</dimen>
-
- <dimen name="all_apps_button_vertical_padding">4dip</dimen>
-
- <!-- roughly a status bar (for determining how many rows of icons are in home) -->
- <dimen name="status_bar_height">48dip</dimen>
-
- <!-- dimensions for the wallpaper picker wallpaper thumbnail width -->
- <dimen name="wallpaper_chooser_grid_width">196dp</dimen>
- <dimen name="wallpaper_chooser_grid_height">140dp</dimen>
-
- <!-- When dragging items on the workspace, the number of dps by which the position of
- the drag view should be offset from the position of the original view. -->
- <dimen name="dragViewOffsetX">0dp</dimen>
- <dimen name="dragViewOffsetY">-12dp</dimen>
- <!-- When dragging an item, how much bigger (fixed dps) the dragged view
- should be. If 0, it will not be scaled at all. -->
- <dimen name="dragViewScale">8dp</dimen>
-
-<!-- Folders -->
- <!-- The size of the image which sits behind the preview of the folder contents -->
- <dimen name="folder_preview_size">78dp</dimen>
- <!-- The amount that the preview contents are inset from the preview background -->
- <dimen name="folder_preview_padding">4dp</dimen>
</resources>
diff --git a/res/values-sw720dp-land/dimens.xml b/res/values-sw720dp-land/dimens.xml
index 239bdf5..e7fe32c 100644
--- a/res/values-sw720dp-land/dimens.xml
+++ b/res/values-sw720dp-land/dimens.xml
@@ -15,12 +15,33 @@
-->
<resources>
- <integer name="apps_customize_widget_cell_count_x">4</integer>
- <integer name="apps_customize_widget_cell_count_y">2</integer>
-
<!-- AppsCustomize -->
<dimen name="apps_customize_pageLayoutWidthGap">28dp</dimen>
<dimen name="apps_customize_pageLayoutHeightGap">16dp</dimen>
<dimen name="apps_customize_pageLayoutPaddingLeft">16dp</dimen>
<dimen name="apps_customize_pageLayoutPaddingRight">16dp</dimen>
-</resources> \ No newline at end of file
+
+<!-- Workspace -->
+ <dimen name="workspace_left_padding">24dip</dimen>
+ <dimen name="workspace_right_padding">24dip</dimen>
+ <!-- We need padding on the screens for portals to look right -->
+ <dimen name="workspace_top_padding">12dip</dimen>
+ <dimen name="workspace_bottom_padding">12dip</dimen>
+ <dimen name="workspace_width_gap">32dp</dimen>
+ <dimen name="workspace_height_gap">2dp</dimen>
+ <dimen name="workspace_page_spacing">50dp</dimen>
+
+ <!-- the area at the edge of the screen that makes the workspace go left
+ or right while you're dragging. -->
+ <dimen name="scroll_zone">100dip</dimen>
+
+ <integer name="apps_customize_widget_cell_count_x">4</integer>
+ <integer name="apps_customize_widget_cell_count_y">2</integer>
+ <integer name="apps_customize_cling_focused_x">4</integer>
+ <integer name="apps_customize_cling_focused_y">2</integer>
+
+<!-- Cling -->
+ <!-- The offset for the text in the cling -->
+ <dimen name="cling_text_block_offset_x">140dp</dimen>
+ <dimen name="cling_text_block_offset_y">80dp</dimen>
+</resources>
diff --git a/res/values-sw720dp-port/dimens.xml b/res/values-sw720dp-port/dimens.xml
index 52c105d..2e0d74a 100644
--- a/res/values-sw720dp-port/dimens.xml
+++ b/res/values-sw720dp-port/dimens.xml
@@ -15,9 +15,6 @@
-->
<resources>
-<!-- Workspace -->
- <dimen name="workspace_page_spacing">24dp</dimen>
-
<!-- AppsCustomize -->
<integer name="apps_customize_maxCellCountX">-1</integer>
<integer name="apps_customize_maxCellCountY">7</integer>
@@ -29,4 +26,25 @@
xlarge -->
<integer name="apps_customize_widget_cell_count_x">3</integer>
<integer name="apps_customize_widget_cell_count_y">3</integer>
-</resources> \ No newline at end of file
+
+<!-- Workspace -->
+ <!-- the area at the edge of the screen that makes the workspace go left
+ or right while you're dragging. -->
+ <dimen name="scroll_zone">40dp</dimen>
+
+ <dimen name="workspace_left_padding">15dip</dimen>
+ <dimen name="workspace_right_padding">15dip</dimen>
+ <dimen name="workspace_top_padding">25dip</dimen>
+ <dimen name="workspace_bottom_padding">25dip</dimen>
+ <dimen name="workspace_width_gap">0dp</dimen>
+ <dimen name="workspace_height_gap">32dp</dimen>
+ <dimen name="workspace_page_spacing">24dp</dimen>
+
+ <integer name="apps_customize_cling_focused_x">2</integer>
+ <integer name="apps_customize_cling_focused_y">2</integer>
+
+<!-- Cling -->
+ <!-- The offset for the text in the cling -->
+ <dimen name="cling_text_block_offset_x">80dp</dimen>
+ <dimen name="cling_text_block_offset_y">160dp</dimen>
+</resources>
diff --git a/res/values-sw600dp-port/styles.xml b/res/values-sw720dp-port/styles.xml
index 57f07ac..57f07ac 100644
--- a/res/values-sw600dp-port/styles.xml
+++ b/res/values-sw720dp-port/styles.xml
diff --git a/res/values-sw720dp/config.xml b/res/values-sw720dp/config.xml
new file mode 100644
index 0000000..8141283
--- /dev/null
+++ b/res/values-sw720dp/config.xml
@@ -0,0 +1,22 @@
+<resources>
+ <bool name="config_largeHeap">true</bool>
+ <bool name="is_large_screen">true</bool>
+
+<!-- AllApps/Customize/AppsCustomize -->
+ <!-- Out of 100, the percent to shrink the workspace during spring loaded mode. -->
+ <integer name="config_workspaceSpringLoadShrinkPercentage">90</integer>
+
+<!-- Workspace -->
+ <!-- Whether or not the drop targets drop down as opposed to fade in -->
+ <bool name="config_useDropTargetDownTransition">true</bool>
+ <!-- Whether or not to fade the side pages -->
+ <bool name="config_workspaceFadeAdjacentScreens">true</bool>
+
+ <!-- When dragging items on the workspace, how much bigger (in pixels) the dragged view
+ should be, as compared to the original view. If 0, it will not be scaled at all.
+ Should be an even number, for pixel alignment. -->
+ <integer name="config_dragViewExtraPixels">0</integer>
+
+ <!-- When shrinking the workspace, this is the percentage of its original size. -->
+ <integer name="config_workspaceShrinkPercent">17</integer>
+</resources>
diff --git a/res/values-sw720dp/dimens.xml b/res/values-sw720dp/dimens.xml
index 48faf9a..d5f411c 100644
--- a/res/values-sw720dp/dimens.xml
+++ b/res/values-sw720dp/dimens.xml
@@ -15,9 +15,56 @@
-->
<resources>
+<!-- QSB -->
+ <dimen name="toolbar_button_vertical_padding">12dip</dimen>
+ <dimen name="toolbar_button_horizontal_padding">12dip</dimen>
+
+<!-- Workspace -->
+ <dimen name="qsb_bar_height">56dp</dimen>
+ <!-- This should be @dimen/qsb_bar_height - @dimen/workspace_top_padding
+ to fix the extra space given to draw portals -->
+ <dimen name="workspace_content_large_only_top_margin">36dp</dimen>
+ <dimen name="workspace_cell_width">96dip</dimen>
+ <dimen name="workspace_cell_height">96dip</dimen>
+
<!-- AppsCustomize -->
<integer name="apps_customize_maxCellCountX">-1</integer>
<integer name="apps_customize_maxCellCountY">-1</integer>
<dimen name="app_widget_preview_padding_left">0dp</dimen>
<dimen name="app_widget_preview_padding_top">10dp</dimen>
-</resources> \ No newline at end of file
+
+ <!-- The corner radius to draw the external drop icon rounded rect -->
+ <dimen name="external_drop_icon_rect_radius">10dp</dimen>
+
+ <!-- Size of icons in workspace -->
+ <dimen name="app_icon_size">72dp</dimen>
+ <integer name="app_icon_hotseat_scale_percent">-1</integer>
+
+ <!-- extra horizontal spacing between mini screen thumbnails ie. in all
+ apps and in customization mode -->
+ <dimen name="smallScreenExtraSpacing">0dip</dimen>
+
+ <!-- Vertical spacing between edge of screen and mini cell layouts when they
+ are minimized to the bottom in all apps -->
+ <dimen name="allAppsSmallScreenVerticalMarginLandscape">30dip</dimen>
+ <dimen name="allAppsSmallScreenVerticalMarginPortrait">60dip</dimen>
+
+ <dimen name="all_apps_button_vertical_padding">4dip</dimen>
+
+ <!-- roughly a status bar (for determining how many rows of icons are in home) -->
+ <dimen name="status_bar_height">48dip</dimen>
+
+ <!-- dimensions for the wallpaper picker wallpaper thumbnail width -->
+ <dimen name="wallpaper_chooser_grid_width">196dp</dimen>
+ <dimen name="wallpaper_chooser_grid_height">140dp</dimen>
+ <dimen name="live_wallpaper_grid_item_padding">8dip</dimen>
+
+ <!-- How much the content view of an alert dialog should be inset (currently used
+ for the WallpaperChooser in XLarge mode) -->
+ <dimen name="alert_dialog_content_inset">0dp</dimen>
+
+ <!-- When dragging items on the workspace, the number of dps by which the position of
+ the drag view should be offset from the position of the original view. -->
+ <dimen name="dragViewOffsetX">0dp</dimen>
+ <dimen name="dragViewOffsetY">-12dp</dimen>
+</resources>
diff --git a/res/values-sw600dp/styles.xml b/res/values-sw720dp/styles.xml
index 87110da..87110da 100644
--- a/res/values-sw600dp/styles.xml
+++ b/res/values-sw720dp/styles.xml
diff --git a/res/values-sw600dp/wallpapers.xml b/res/values-sw720dp/wallpapers.xml
index fb386f4..fb386f4 100644
--- a/res/values-sw600dp/wallpapers.xml
+++ b/res/values-sw720dp/wallpapers.xml
diff --git a/res/values/colors.xml b/res/values/colors.xml
index 1efeb9e..c2e1e7b 100644
--- a/res/values/colors.xml
+++ b/res/values/colors.xml
@@ -29,4 +29,5 @@
<color name="workspace_all_apps_and_delete_zone_text_color">#CCFFFFFF</color>
<color name="workspace_all_apps_and_delete_zone_text_shadow_color">#A0000000</color>
+ <color name="workspace_icon_text_color">#FFF</color>
</resources>
diff --git a/res/values/config.xml b/res/values/config.xml
index 45ab544..31ef18a 100644
--- a/res/values/config.xml
+++ b/res/values/config.xml
@@ -1,6 +1,7 @@
<resources>
<bool name="config_hardwareAccelerated">true</bool>
<bool name="config_largeHeap">false</bool>
+ <bool name="is_large_screen">false</bool>
<!-- AllApps/Customize/AppsCustomize -->
<!-- The alpha of the AppsCustomize bg in spring loaded mode -->
@@ -69,4 +70,9 @@
<integer name="folder_max_count_x">4</integer>
<integer name="folder_max_count_y">4</integer>
<integer name="folder_max_num_items">16</integer>
+
+ <integer name="cell_count_x">4</integer>
+ <integer name="cell_count_y">4</integer>
+ <integer name="hotseat_cell_count">5</integer>
+ <integer name="hotseat_all_apps_index">2</integer>
</resources>
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index 4ef4f4d..890e216 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -37,6 +37,7 @@
<dimen name="workspace_max_gap">16dp</dimen>
<dimen name="folder_cell_width">74dp</dimen>
<dimen name="folder_cell_height">82dp</dimen>
+ <dimen name="folder_icon_padding_top">2dp</dimen>
<dimen name="workspace_divider_padding_left">3dp</dimen>
<dimen name="workspace_divider_padding_right">3dp</dimen>
<dimen name="workspace_divider_padding_top">0dp</dimen>
@@ -47,6 +48,7 @@
<dimen name="hotseat_height_gap">-1dp</dimen>
<dimen name="workspace_overscroll_drawable_padding">0dp</dimen>
+ <dimen name="app_icon_drawable_padding">6dp</dimen>
<dimen name="app_icon_padding_top">8dp</dimen>
<!-- QSB -->
@@ -64,6 +66,7 @@
<dimen name="apps_customize_tab_bar_height">52dp</dimen>
<dimen name="apps_customize_tab_bar_margin_top">0dp</dimen>
<dimen name="app_icon_size">48dp</dimen>
+ <integer name="app_icon_hotseat_scale_percent">-1</integer>
<!-- The width can be 72dp because we don't have L/R padding -->
<dimen name="apps_customize_cell_width">74dp</dimen>
<dimen name="apps_customize_cell_height">82dp</dimen>
diff --git a/res/values/styles.xml b/res/values/styles.xml
index 909887c..f5224d2 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -63,13 +63,13 @@
<item name="android:singleLine">true</item>
<item name="android:ellipsize">marquee</item>
<item name="android:textSize">12sp</item>
- <item name="android:textColor">#FFF</item>
+ <item name="android:textColor">@color/workspace_icon_text_color</item>
<item name="android:shadowRadius">2.0</item>
<item name="android:shadowColor">#B0000000</item>
</style>
<style name="WorkspaceIcon.Portrait">
- <item name="android:drawablePadding">8dp</item>
+ <item name="android:drawablePadding">@dimen/app_icon_drawable_padding</item>
<item name="android:paddingLeft">4dp</item>
<item name="android:paddingRight">4dp</item>
<item name="android:paddingTop">@dimen/app_icon_padding_top</item>
@@ -86,7 +86,7 @@
<style name="WorkspaceIcon.Portrait.Folder">
<item name="android:drawablePadding">0dp</item>
- <item name="android:paddingTop">2dp</item>
+ <item name="android:paddingTop">@dimen/folder_icon_padding_top</item>
</style>
<style name="WorkspaceIcon.Landscape.Folder">
<item name="android:drawablePadding">0dp</item>
diff --git a/src/com/android/launcher2/BubbleTextView.java b/src/com/android/launcher2/BubbleTextView.java
index 6227611..b41a02e 100644
--- a/src/com/android/launcher2/BubbleTextView.java
+++ b/src/com/android/launcher2/BubbleTextView.java
@@ -178,6 +178,7 @@ public class BubbleTextView extends TextView {
// The translate of scrollX and scrollY is necessary when drawing TextViews, because
// they set scrollX and scrollY to large values to achieve centered text
destCanvas.save();
+ destCanvas.scale(getScaleX(), getScaleY(), getWidth() / 2, getHeight() / 2);
destCanvas.translate(-getScrollX() + padding / 2, -getScrollY() + padding / 2);
destCanvas.clipRect(clipRect, Op.REPLACE);
draw(destCanvas);
@@ -292,6 +293,14 @@ public class BubbleTextView extends TextView {
canvas.translate(-scrollX, -scrollY);
}
}
+
+ // If text is transparent, don't draw any shadow
+ if (getCurrentTextColor() == android.R.color.transparent) {
+ getPaint().clearShadowLayer();
+ super.draw(canvas);
+ return;
+ }
+
// We enhance the shadow by drawing the shadow twice
getPaint().setShadowLayer(SHADOW_LARGE_RADIUS, 0.0f, SHADOW_Y_OFFSET, SHADOW_LARGE_COLOUR);
super.draw(canvas);
diff --git a/src/com/android/launcher2/CellLayout.java b/src/com/android/launcher2/CellLayout.java
index 37328ef..bbb0d7f 100644
--- a/src/com/android/launcher2/CellLayout.java
+++ b/src/com/android/launcher2/CellLayout.java
@@ -28,6 +28,7 @@ import android.content.res.Resources;
import android.content.res.TypedArray;
import android.graphics.Bitmap;
import android.graphics.Canvas;
+import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.Point;
import android.graphics.PointF;
@@ -135,6 +136,9 @@ public class CellLayout extends ViewGroup {
private TimeInterpolator mEaseOutInterpolator;
private CellLayoutChildren mChildren;
+ private boolean mIsHotseat = false;
+ private final int mBubbleScalePercent;
+
public CellLayout(Context context) {
this(context, null);
}
@@ -180,6 +184,8 @@ public class CellLayout extends ViewGroup {
mNormalBackground.setFilterBitmap(true);
mActiveGlowBackground.setFilterBitmap(true);
+ mBubbleScalePercent = res.getInteger(R.integer.app_icon_hotseat_scale_percent);
+
// Initialize the data structures used for the drag visualization.
mCrosshairsDrawable = res.getDrawable(R.drawable.gardening_crosshairs);
@@ -489,6 +495,25 @@ public class CellLayout extends ViewGroup {
@Override
protected void dispatchDraw(Canvas canvas) {
+ // Debug drawing for hit space
+ if (false) {
+ final Rect frame = mRect;
+ for (int i = mChildren.getChildCount() - 1; i >= 0; i--) {
+ final View child = mChildren.getChildAt(i);
+ final LayoutParams lp = (LayoutParams) child.getLayoutParams();
+
+ if ((child.getVisibility() == VISIBLE || child.getAnimation() != null) &&
+ lp.isLockedToGrid) {
+ child.getHitRect(frame);
+ frame.offset(mPaddingLeft, mPaddingTop);
+
+ Paint p = new Paint();
+ p.setColor(Color.GREEN);
+ canvas.drawRect(frame, p);
+ }
+ }
+ }
+
super.dispatchDraw(canvas);
if (mForegroundAlpha > 0) {
mOverScrollForegroundDrawable.setBounds(mForegroundRect);
@@ -551,10 +576,55 @@ public class CellLayout extends ViewGroup {
return mCountY;
}
+ public void setIsHotseat(boolean isHotseat) {
+ mIsHotseat = isHotseat;
+ }
+
public boolean addViewToCellLayout(
View child, int index, int childId, LayoutParams params, boolean markCells) {
+ return addViewToCellLayout(child, index, childId, params, markCells, false);
+ }
+
+ public boolean addViewToCellLayout(View child, int index, int childId, LayoutParams params,
+ boolean markCells, boolean allApps) {
final LayoutParams lp = params;
+ // Hotseat icons - scale down and remove text
+ // Don't scale the all apps button
+ // scale percent set to -1 means do not scale
+ // Only scale BubbleTextViews
+ if (child instanceof BubbleTextView) {
+ BubbleTextView bubbleChild = (BubbleTextView) child;
+
+ if (mIsHotseat && !allApps && mBubbleScalePercent >= 0) {
+ // If we haven't measured the child yet, do it now
+ // (this happens if we're being dropped from all-apps
+ if ((bubbleChild.getMeasuredWidth() | bubbleChild.getMeasuredHeight()) == 0) {
+ getChildrenLayout().measureChild(bubbleChild);
+ }
+ int measuredWidth = bubbleChild.getMeasuredWidth();
+ int measuredHeight = bubbleChild.getMeasuredHeight();
+
+ float bubbleScale = mBubbleScalePercent / 100f;
+ bubbleChild.setPivotX(0);
+ bubbleChild.setPivotY(0);
+ bubbleChild.setScaleX(bubbleScale);
+ bubbleChild.setScaleY(bubbleScale);
+ bubbleChild.setTranslationX(measuredWidth * (1 - bubbleScale) / 2);
+ bubbleChild.setTranslationY(measuredHeight * (1 - bubbleScale) / 2);
+
+ bubbleChild.setTextColor(android.R.color.transparent);
+ } else {
+ bubbleChild.setScaleX(1f);
+ bubbleChild.setScaleY(1f);
+ bubbleChild.setTranslationX(0f);
+ bubbleChild.setTranslationY(0f);
+
+ bubbleChild.setTextColor(
+ getResources().getColor(R.color.workspace_icon_text_color));
+ }
+ }
+
// Generate an id for each view, this assumes we have at most 256x256 cells
// per workspace screen
if (lp.cellX >= 0 && lp.cellX <= mCountX - 1 && lp.cellY >= 0 && lp.cellY <= mCountY - 1) {
diff --git a/src/com/android/launcher2/Hotseat.java b/src/com/android/launcher2/Hotseat.java
index f7fa380..add62c0 100644
--- a/src/com/android/launcher2/Hotseat.java
+++ b/src/com/android/launcher2/Hotseat.java
@@ -29,13 +29,13 @@ import com.android.launcher.R;
public class Hotseat extends FrameLayout {
private static final String TAG = "Hotseat";
- private static final int sAllAppsButtonRank = 2; // In the middle of the dock
private Launcher mLauncher;
private CellLayout mContent;
private int mCellCountX;
private int mCellCountY;
+ private int mAllAppsButtonRank;
private boolean mIsLandscape;
public Hotseat(Context context) {
@@ -53,6 +53,7 @@ public class Hotseat extends FrameLayout {
R.styleable.Hotseat, defStyle, 0);
mCellCountX = a.getInt(R.styleable.Hotseat_cellCountX, -1);
mCellCountY = a.getInt(R.styleable.Hotseat_cellCountY, -1);
+ mAllAppsButtonRank = context.getResources().getInteger(R.integer.hotseat_all_apps_index);
mIsLandscape = context.getResources().getConfiguration().orientation ==
Configuration.ORIENTATION_LANDSCAPE;
}
@@ -77,8 +78,8 @@ public class Hotseat extends FrameLayout {
int getCellYFromOrder(int rank) {
return mIsLandscape ? (mContent.getCountY() - (rank + 1)) : 0;
}
- public static boolean isAllAppsButtonRank(int rank) {
- return rank == sAllAppsButtonRank;
+ public boolean isAllAppsButtonRank(int rank) {
+ return rank == mAllAppsButtonRank;
}
@Override
@@ -88,6 +89,7 @@ public class Hotseat extends FrameLayout {
if (mCellCountY < 0) mCellCountY = LauncherModel.getCellCountY();
mContent = (CellLayout) findViewById(R.id.layout);
mContent.setGridSize(mCellCountX, mCellCountY);
+ mContent.setIsHotseat(true);
resetLayout();
}
@@ -126,9 +128,9 @@ public class Hotseat extends FrameLayout {
// Note: We do this to ensure that the hotseat is always laid out in the orientation of
// the hotseat in order regardless of which orientation they were added
- int x = getCellXFromOrder(sAllAppsButtonRank);
- int y = getCellYFromOrder(sAllAppsButtonRank);
+ int x = getCellXFromOrder(mAllAppsButtonRank);
+ int y = getCellYFromOrder(mAllAppsButtonRank);
mContent.addViewToCellLayout(allAppsButton, -1, 0, new CellLayout.LayoutParams(x,y,1,1),
- true);
+ true, true);
}
}
diff --git a/src/com/android/launcher2/Launcher.java b/src/com/android/launcher2/Launcher.java
index e80f9a6..d8a4384 100644
--- a/src/com/android/launcher2/Launcher.java
+++ b/src/com/android/launcher2/Launcher.java
@@ -2213,6 +2213,10 @@ public final class Launcher extends Activity
return (mState == State.APPS_CUSTOMIZE);
}
+ public boolean isAllAppsButtonRank(int rank) {
+ return mHotseat.isAllAppsButtonRank(rank);
+ }
+
// AllAppsView.Watcher
public void zoomed(float zoom) {
if (zoom == 1.0f) {
diff --git a/src/com/android/launcher2/LauncherApplication.java b/src/com/android/launcher2/LauncherApplication.java
index e69c5ab..47ce0b7 100644
--- a/src/com/android/launcher2/LauncherApplication.java
+++ b/src/com/android/launcher2/LauncherApplication.java
@@ -27,6 +27,8 @@ import android.database.ContentObserver;
import android.os.Handler;
import android.view.MotionEvent;
+import com.android.launcher.R;
+
import java.lang.ref.WeakReference;
public class LauncherApplication extends Application {
@@ -42,10 +44,7 @@ public class LauncherApplication extends Application {
super.onCreate();
// set sIsScreenXLarge and sScreenDensity *before* creating icon cache
- final int screenSize = getResources().getConfiguration().screenLayout &
- Configuration.SCREENLAYOUT_SIZE_MASK;
- sIsScreenLarge = screenSize == Configuration.SCREENLAYOUT_SIZE_LARGE ||
- screenSize == Configuration.SCREENLAYOUT_SIZE_XLARGE;
+ sIsScreenLarge = getResources().getBoolean(R.bool.is_large_screen);
sScreenDensity = getResources().getDisplayMetrics().density;
mIconCache = new IconCache(this);
diff --git a/src/com/android/launcher2/LauncherModel.java b/src/com/android/launcher2/LauncherModel.java
index 7da55db..159ddb0 100644
--- a/src/com/android/launcher2/LauncherModel.java
+++ b/src/com/android/launcher2/LauncherModel.java
@@ -138,6 +138,7 @@ public class LauncherModel extends BroadcastReceiver {
public void bindAppsRemoved(ArrayList<ApplicationInfo> apps, boolean permanent);
public void bindPackagesUpdated();
public boolean isAllAppsVisible();
+ public boolean isAllAppsButtonRank(int rank);
public void bindSearchablesChanged();
}
@@ -920,7 +921,7 @@ public class LauncherModel extends BroadcastReceiver {
int containerIndex = item.screen;
if (item.container == LauncherSettings.Favorites.CONTAINER_HOTSEAT) {
// Return early if we detect that an item is under the hotseat button
- if (Hotseat.isAllAppsButtonRank(item.screen)) {
+ if (mCallbacks == null || mCallbacks.get().isAllAppsButtonRank(item.screen)) {
return false;
}
diff --git a/src/com/android/launcher2/LauncherProvider.java b/src/com/android/launcher2/LauncherProvider.java
index a01cc47..de9a9b2 100644
--- a/src/com/android/launcher2/LauncherProvider.java
+++ b/src/com/android/launcher2/LauncherProvider.java
@@ -706,6 +706,8 @@ public class LauncherProvider extends ContentProvider {
ContentValues values = new ContentValues();
PackageManager packageManager = mContext.getPackageManager();
+ int allAppsButtonRank =
+ mContext.getResources().getInteger(R.integer.hotseat_all_apps_index);
int i = 0;
try {
XmlResourceParser parser = mContext.getResources().getXml(workspaceResourceId);
@@ -739,8 +741,8 @@ public class LauncherProvider extends ContentProvider {
// If we are adding to the hotseat, the screen is used as the position in the
// hotseat. This screen can't be at position 0 because AllApps is in the
// zeroth position.
- if (container == LauncherSettings.Favorites.CONTAINER_HOTSEAT &&
- Hotseat.isAllAppsButtonRank(Integer.valueOf(screen))) {
+ if (container == LauncherSettings.Favorites.CONTAINER_HOTSEAT
+ && Integer.valueOf(screen) == allAppsButtonRank) {
throw new RuntimeException("Invalid screen position for hotseat item");
}
diff --git a/src/com/android/launcher2/Utilities.java b/src/com/android/launcher2/Utilities.java
index d7562a9..0387011 100644
--- a/src/com/android/launcher2/Utilities.java
+++ b/src/com/android/launcher2/Utilities.java
@@ -113,7 +113,6 @@ final class Utilities {
}
int sourceWidth = icon.getIntrinsicWidth();
int sourceHeight = icon.getIntrinsicHeight();
-
if (sourceWidth > 0 && sourceHeight > 0) {
// There are intrinsic sizes.
if (width < sourceWidth || height < sourceHeight) {
diff --git a/src/com/android/launcher2/Workspace.java b/src/com/android/launcher2/Workspace.java
index 0624d74..dffaf89 100644
--- a/src/com/android/launcher2/Workspace.java
+++ b/src/com/android/launcher2/Workspace.java
@@ -1429,7 +1429,7 @@ public class Workspace extends SmoothPagedView
* 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
* animation on a view, it evokes the sense that the object is shrinking due to moving away
- * from the camera.
+ * from the camera.
*/
static class ZInterpolator implements TimeInterpolator {
private float focalLength;
@@ -1588,7 +1588,7 @@ public class Workspace extends SmoothPagedView
setLayoutScale(1.0f);
}
- final int duration = zoomIn ?
+ final int duration = zoomIn ?
getResources().getInteger(R.integer.config_workspaceUnshrinkTime) :
getResources().getInteger(R.integer.config_appsCustomizeWorkspaceShrinkTime);
for (int i = 0; i < getChildCount(); i++) {
@@ -2042,7 +2042,7 @@ public class Workspace extends SmoothPagedView
// is full
if (mTargetCell != null && mLauncher.isHotseatLayout(mDragTargetLayout)) {
Hotseat hotseat = mLauncher.getHotseat();
- if (Hotseat.isAllAppsButtonRank(
+ if (hotseat.isAllAppsButtonRank(
hotseat.getOrderInHotseat(mTargetCell[0], mTargetCell[1]))) {
return false;
}
@@ -3077,6 +3077,7 @@ public class Workspace extends SmoothPagedView
CellLayout.LayoutParams lp = (CellLayout.LayoutParams) view.getLayoutParams();
cellLayout.getChildrenLayout().measureChild(view);
+
LauncherModel.addOrMoveItemInDatabase(mLauncher, info, container, screen,
lp.cellX, lp.cellY);