summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--res/layout-xlarge-land/launcher.xml3
-rw-r--r--res/layout-xlarge-port/launcher.xml3
-rw-r--r--res/values-es-rUS/strings.xml4
-rw-r--r--res/values-fa/strings.xml4
-rw-r--r--res/values-fi/strings.xml4
-rw-r--r--res/values-fr/strings.xml4
-rw-r--r--res/values-hr/strings.xml4
-rw-r--r--res/values-hu/strings.xml4
-rw-r--r--res/values-in/strings.xml4
-rw-r--r--res/values-it/strings.xml4
-rw-r--r--res/values-iw/strings.xml4
-rw-r--r--res/values-ja/strings.xml4
-rw-r--r--res/values-ko/strings.xml4
-rw-r--r--res/values-lt/strings.xml4
-rw-r--r--res/values-lv/strings.xml4
-rw-r--r--res/values-nb/strings.xml4
-rw-r--r--res/values-nl/strings.xml4
-rw-r--r--res/values-pl/strings.xml4
-rw-r--r--res/values-pt-rPT/strings.xml4
-rw-r--r--res/values-pt/strings.xml4
-rw-r--r--res/values-ro/strings.xml4
-rw-r--r--res/values-ru/strings.xml4
-rw-r--r--res/values-sk/strings.xml4
-rw-r--r--res/values-sl/strings.xml4
-rw-r--r--res/values-sr/strings.xml4
-rw-r--r--res/values-sv/strings.xml6
-rw-r--r--res/values-th/strings.xml4
-rw-r--r--res/values-tl/strings.xml4
-rw-r--r--res/values-tr/strings.xml4
-rw-r--r--res/values-uk/strings.xml4
-rw-r--r--res/values-vi/strings.xml4
-rw-r--r--res/values-xlarge/config.xml7
-rw-r--r--res/values-zh-rCN/strings.xml4
-rw-r--r--res/values-zh-rTW/strings.xml4
-rw-r--r--res/values/config.xml12
-rw-r--r--src/com/android/launcher2/AllApps2D.java2
-rw-r--r--src/com/android/launcher2/AllApps3D.java14
-rw-r--r--src/com/android/launcher2/AllAppsPagedView.java3
-rw-r--r--src/com/android/launcher2/BubbleTextView.java29
-rw-r--r--src/com/android/launcher2/CustomizePagedView.java226
-rw-r--r--src/com/android/launcher2/DragController.java34
-rw-r--r--src/com/android/launcher2/DragSource.java2
-rw-r--r--src/com/android/launcher2/Folder.java2
-rw-r--r--src/com/android/launcher2/Launcher.java193
-rw-r--r--src/com/android/launcher2/LauncherModel.java18
-rw-r--r--src/com/android/launcher2/PagedView.java56
-rw-r--r--src/com/android/launcher2/PagedViewCellLayout.java1
-rw-r--r--src/com/android/launcher2/PagedViewIcon.java18
-rw-r--r--src/com/android/launcher2/PagedViewWidget.java18
-rw-r--r--src/com/android/launcher2/UserFolder.java2
-rw-r--r--src/com/android/launcher2/Workspace.java102
51 files changed, 482 insertions, 389 deletions
diff --git a/res/layout-xlarge-land/launcher.xml b/res/layout-xlarge-land/launcher.xml
index 957327e..590787f 100644
--- a/res/layout-xlarge-land/launcher.xml
+++ b/res/layout-xlarge-land/launcher.xml
@@ -113,7 +113,6 @@
android:paddingBottom="@dimen/toolbar_button_vertical_padding"
android:background="@drawable/button_bg"
- android:onClick="onClickConfigureButton"
android:focusable="true"
android:clickable="true" />
<ImageView
@@ -125,7 +124,6 @@
android:paddingTop="@dimen/toolbar_button_vertical_padding"
android:paddingBottom="@dimen/toolbar_button_vertical_padding"
- android:onClick="onClickAllAppsButton"
android:focusable="false"
android:clickable="true" />
<TextView
@@ -151,7 +149,6 @@
android:shadowDy="0.0"
android:shadowRadius="2.5"
- android:onClick="onClickAllAppsButton"
android:focusable="true"
android:clickable="true" />
<ImageView
diff --git a/res/layout-xlarge-port/launcher.xml b/res/layout-xlarge-port/launcher.xml
index a8087f4..4c83fda 100644
--- a/res/layout-xlarge-port/launcher.xml
+++ b/res/layout-xlarge-port/launcher.xml
@@ -113,7 +113,6 @@
android:paddingBottom="@dimen/toolbar_button_vertical_padding"
android:background="@drawable/button_bg"
- android:onClick="onClickConfigureButton"
android:focusable="true"
android:clickable="true" />
<ImageView
@@ -125,7 +124,6 @@
android:paddingTop="@dimen/toolbar_button_vertical_padding"
android:paddingBottom="@dimen/toolbar_button_vertical_padding"
- android:onClick="onClickAllAppsButton"
android:focusable="false"
android:clickable="true" />
<TextView
@@ -151,7 +149,6 @@
android:shadowDy="0.0"
android:shadowRadius="2.5"
- android:onClick="onClickAllAppsButton"
android:focusable="true"
android:clickable="true" />
<ImageView
diff --git a/res/values-es-rUS/strings.xml b/res/values-es-rUS/strings.xml
index 64d5483..aadeeb3 100644
--- a/res/values-es-rUS/strings.xml
+++ b/res/values-es-rUS/strings.xml
@@ -31,12 +31,12 @@
<string name="folders_tab_label" msgid="1145293785541489736">"Carpetas"</string>
<string name="shortcuts_tab_label" msgid="8640731503933155644">"Más"</string>
<string name="wallpapers_tab_label" msgid="1617804870364119879">"Papeles tapiz"</string>
- <!-- outdated translation 7756968120518062632 --> <string name="applications_tab_label" msgid="2991364240020736760">"Accesos directos a aplicaciones"</string>
+ <!-- outdated translation 9046797126882613707 --> <string name="applications_tab_label" msgid="2991364240020736760">"Accesos directos a aplicaciones"</string>
<string name="wallpapers_temp_tab_text" msgid="1660218201190495279">"Ésta será la pestaña para los papeles tapiz"</string>
<string name="all_apps_tab_all" msgid="2942727589595027258">"Todos"</string>
<string name="all_apps_tab_apps" msgid="5468972551904071712">"Aplicaciones"</string>
<string name="all_apps_tab_games" msgid="1855736784923494918">"Juegos"</string>
- <!-- outdated translation 8787424814319499411 --> <string name="all_apps_tab_downloaded" msgid="1488049110598641387">"Mis aplicaciones"</string>
+ <!-- outdated translation 3335316755603669951 --> <string name="all_apps_tab_downloaded" msgid="1488049110598641387">"Mis aplicaciones"</string>
<string name="all_apps_no_games" msgid="5293893733372793696">"No se encontraron juegos."</string>
<string name="all_apps_no_downloads" msgid="2284720393234453761">"No has descargado ninguna aplicación."</string>
<string name="external_drop_widget_error" msgid="4976816434597126575">"No se pudo colocar el elemento en esta pantalla principal"</string>
diff --git a/res/values-fa/strings.xml b/res/values-fa/strings.xml
index a6b02f9..8777d8a 100644
--- a/res/values-fa/strings.xml
+++ b/res/values-fa/strings.xml
@@ -31,12 +31,12 @@
<string name="folders_tab_label" msgid="1145293785541489736">"پوشه ها"</string>
<string name="shortcuts_tab_label" msgid="8640731503933155644">"بیشتر"</string>
<string name="wallpapers_tab_label" msgid="1617804870364119879">"تصاویر زمینه"</string>
- <!-- outdated translation 7756968120518062632 --> <string name="applications_tab_label" msgid="2991364240020736760">"میانبرهای برنامه کاربردی"</string>
+ <!-- outdated translation 9046797126882613707 --> <string name="applications_tab_label" msgid="2991364240020736760">"میانبرهای برنامه کاربردی"</string>
<string name="wallpapers_temp_tab_text" msgid="1660218201190495279">"این برگه تصاویر زمینه خواهد بود"</string>
<string name="all_apps_tab_all" msgid="2942727589595027258">"همه"</string>
<string name="all_apps_tab_apps" msgid="5468972551904071712">"برنامه های کاربردی"</string>
<string name="all_apps_tab_games" msgid="1855736784923494918">"بازی ها"</string>
- <!-- outdated translation 7753043607780556423 --> <string name="all_apps_tab_downloaded" msgid="1488049110598641387">"دانلود شد"</string>
+ <!-- outdated translation 3335316755603669951 --> <string name="all_apps_tab_downloaded" msgid="1488049110598641387">"برنامه های کاربردی من"</string>
<string name="all_apps_no_games" msgid="5293893733372793696">"هیچ بازی پیدا نشد."</string>
<string name="all_apps_no_downloads" msgid="2284720393234453761">"شما هیچ برنامه کاربردی دانلود شده ای ندارید."</string>
<string name="external_drop_widget_error" msgid="4976816434597126575">"نمی توان موردی در این صفحه اصلی انداخت"</string>
diff --git a/res/values-fi/strings.xml b/res/values-fi/strings.xml
index 80c1713..4d2a049 100644
--- a/res/values-fi/strings.xml
+++ b/res/values-fi/strings.xml
@@ -31,12 +31,12 @@
<string name="folders_tab_label" msgid="1145293785541489736">"Kansiot"</string>
<string name="shortcuts_tab_label" msgid="8640731503933155644">"Lisää"</string>
<string name="wallpapers_tab_label" msgid="1617804870364119879">"Taustakuvat"</string>
- <!-- outdated translation 7756968120518062632 --> <string name="applications_tab_label" msgid="2991364240020736760">"Sovelluspikakuvakkeet"</string>
+ <!-- outdated translation 9046797126882613707 --> <string name="applications_tab_label" msgid="2991364240020736760">"Sovelluspikakuvakkeet"</string>
<string name="wallpapers_temp_tab_text" msgid="1660218201190495279">"Tämä on taustakuvavälilehti"</string>
<string name="all_apps_tab_all" msgid="2942727589595027258">"Kaikki"</string>
<string name="all_apps_tab_apps" msgid="5468972551904071712">"Sovellukset"</string>
<string name="all_apps_tab_games" msgid="1855736784923494918">"Pelit"</string>
- <!-- outdated translation 7753043607780556423 --> <string name="all_apps_tab_downloaded" msgid="1488049110598641387">"Ladatut"</string>
+ <!-- outdated translation 3335316755603669951 --> <string name="all_apps_tab_downloaded" msgid="1488049110598641387">"Omat sovellukset"</string>
<string name="all_apps_no_games" msgid="5293893733372793696">"Ei pelejä."</string>
<string name="all_apps_no_downloads" msgid="2284720393234453761">"Ei ladattuja sovelluksia."</string>
<string name="external_drop_widget_error" msgid="4976816434597126575">"Kohdetta ei voi lisätä etusivulle"</string>
diff --git a/res/values-fr/strings.xml b/res/values-fr/strings.xml
index 83110d1..f43bb5e 100644
--- a/res/values-fr/strings.xml
+++ b/res/values-fr/strings.xml
@@ -31,12 +31,12 @@
<string name="folders_tab_label" msgid="1145293785541489736">"Dossiers"</string>
<string name="shortcuts_tab_label" msgid="8640731503933155644">"Plus"</string>
<string name="wallpapers_tab_label" msgid="1617804870364119879">"Fonds d\'écran"</string>
- <!-- outdated translation 7756968120518062632 --> <string name="applications_tab_label" msgid="2991364240020736760">"Raccourcis des applications"</string>
+ <!-- outdated translation 9046797126882613707 --> <string name="applications_tab_label" msgid="2991364240020736760">"Raccourcis des applications"</string>
<string name="wallpapers_temp_tab_text" msgid="1660218201190495279">"Onglet des fonds d\'écran"</string>
<string name="all_apps_tab_all" msgid="2942727589595027258">"Toutes"</string>
<string name="all_apps_tab_apps" msgid="5468972551904071712">"Applications"</string>
<string name="all_apps_tab_games" msgid="1855736784923494918">"Jeux"</string>
- <!-- outdated translation 7753043607780556423 --> <string name="all_apps_tab_downloaded" msgid="1488049110598641387">"Téléchargées"</string>
+ <!-- outdated translation 3335316755603669951 --> <string name="all_apps_tab_downloaded" msgid="1488049110598641387">"Mes applications"</string>
<string name="all_apps_no_games" msgid="5293893733372793696">"Aucun jeu n\'a été trouvé."</string>
<string name="all_apps_no_downloads" msgid="2284720393234453761">"Vous n\'avez téléchargé aucune application."</string>
<string name="external_drop_widget_error" msgid="4976816434597126575">"Impossible de déposer l\'élément sur l\'écran d\'accueil."</string>
diff --git a/res/values-hr/strings.xml b/res/values-hr/strings.xml
index 931730c..6fa7f3a 100644
--- a/res/values-hr/strings.xml
+++ b/res/values-hr/strings.xml
@@ -31,12 +31,12 @@
<string name="folders_tab_label" msgid="1145293785541489736">"Mape"</string>
<string name="shortcuts_tab_label" msgid="8640731503933155644">"Više"</string>
<string name="wallpapers_tab_label" msgid="1617804870364119879">"Pozadinske slike"</string>
- <!-- outdated translation 7756968120518062632 --> <string name="applications_tab_label" msgid="2991364240020736760">"Prečaci aplikacija"</string>
+ <!-- outdated translation 9046797126882613707 --> <string name="applications_tab_label" msgid="2991364240020736760">"Prečaci aplikacija"</string>
<string name="wallpapers_temp_tab_text" msgid="1660218201190495279">"Ovo će biti kartica pozadinske slike"</string>
<string name="all_apps_tab_all" msgid="2942727589595027258">"Sve"</string>
<string name="all_apps_tab_apps" msgid="5468972551904071712">"Aplikacije"</string>
<string name="all_apps_tab_games" msgid="1855736784923494918">"Igre"</string>
- <!-- outdated translation 7753043607780556423 --> <string name="all_apps_tab_downloaded" msgid="1488049110598641387">"Preuzeto"</string>
+ <!-- outdated translation 3335316755603669951 --> <string name="all_apps_tab_downloaded" msgid="1488049110598641387">"Moje aplikacije"</string>
<string name="all_apps_no_games" msgid="5293893733372793696">"Igre nisu pronađene."</string>
<string name="all_apps_no_downloads" msgid="2284720393234453761">"Nemate preuzetih aplikacija"</string>
<string name="external_drop_widget_error" msgid="4976816434597126575">"Nije bilo moguće spustiti stavku na početni zaslon"</string>
diff --git a/res/values-hu/strings.xml b/res/values-hu/strings.xml
index 93f61e9..e310903 100644
--- a/res/values-hu/strings.xml
+++ b/res/values-hu/strings.xml
@@ -31,12 +31,12 @@
<string name="folders_tab_label" msgid="1145293785541489736">"Mappák"</string>
<string name="shortcuts_tab_label" msgid="8640731503933155644">"Egyebek"</string>
<string name="wallpapers_tab_label" msgid="1617804870364119879">"Háttérképek"</string>
- <!-- outdated translation 7756968120518062632 --> <string name="applications_tab_label" msgid="2991364240020736760">"Alkalmazás-parancsikonok"</string>
+ <!-- outdated translation 9046797126882613707 --> <string name="applications_tab_label" msgid="2991364240020736760">"Alkalmazás-parancsikonok"</string>
<string name="wallpapers_temp_tab_text" msgid="1660218201190495279">"Ez lesz a háttérképek lapja"</string>
<string name="all_apps_tab_all" msgid="2942727589595027258">"Összes"</string>
<string name="all_apps_tab_apps" msgid="5468972551904071712">"Alkalmazások"</string>
<string name="all_apps_tab_games" msgid="1855736784923494918">"Játékok"</string>
- <!-- outdated translation 7753043607780556423 --> <string name="all_apps_tab_downloaded" msgid="1488049110598641387">"Letöltött"</string>
+ <!-- outdated translation 3335316755603669951 --> <string name="all_apps_tab_downloaded" msgid="1488049110598641387">"Saját alkalmazások"</string>
<string name="all_apps_no_games" msgid="5293893733372793696">"Nincsenek játékok."</string>
<string name="all_apps_no_downloads" msgid="2284720393234453761">"Nincsenek letöltött alkalmazásai."</string>
<string name="external_drop_widget_error" msgid="4976816434597126575">"Nem lehet elhelyezni az elemet ezen a főoldalon"</string>
diff --git a/res/values-in/strings.xml b/res/values-in/strings.xml
index 60c3055..af3eff2 100644
--- a/res/values-in/strings.xml
+++ b/res/values-in/strings.xml
@@ -31,12 +31,12 @@
<string name="folders_tab_label" msgid="1145293785541489736">"Map"</string>
<string name="shortcuts_tab_label" msgid="8640731503933155644">"Lainnya"</string>
<string name="wallpapers_tab_label" msgid="1617804870364119879">"Wallpaper"</string>
- <!-- outdated translation 7756968120518062632 --> <string name="applications_tab_label" msgid="2991364240020736760">"Pintasan App"</string>
+ <!-- outdated translation 9046797126882613707 --> <string name="applications_tab_label" msgid="2991364240020736760">"Pintasan App"</string>
<string name="wallpapers_temp_tab_text" msgid="1660218201190495279">"Ini akan menjadi tab wallpaper"</string>
<string name="all_apps_tab_all" msgid="2942727589595027258">"Semua"</string>
<string name="all_apps_tab_apps" msgid="5468972551904071712">"Apps"</string>
<string name="all_apps_tab_games" msgid="1855736784923494918">"Permainan"</string>
- <!-- outdated translation 7753043607780556423 --> <string name="all_apps_tab_downloaded" msgid="1488049110598641387">"Diunduh"</string>
+ <!-- outdated translation 3335316755603669951 --> <string name="all_apps_tab_downloaded" msgid="1488049110598641387">"Apl Saya"</string>
<string name="all_apps_no_games" msgid="5293893733372793696">"Tidak ditemukan permainan."</string>
<string name="all_apps_no_downloads" msgid="2284720393234453761">"Anda tidak memiliki aplikasi yang diunduh."</string>
<string name="external_drop_widget_error" msgid="4976816434597126575">"Tidak dapat menaruh item pada layar utama ini"</string>
diff --git a/res/values-it/strings.xml b/res/values-it/strings.xml
index 54b2f08..e050219 100644
--- a/res/values-it/strings.xml
+++ b/res/values-it/strings.xml
@@ -31,12 +31,12 @@
<string name="folders_tab_label" msgid="1145293785541489736">"Cartelle"</string>
<string name="shortcuts_tab_label" msgid="8640731503933155644">"Altro"</string>
<string name="wallpapers_tab_label" msgid="1617804870364119879">"Sfondi"</string>
- <!-- outdated translation 7756968120518062632 --> <string name="applications_tab_label" msgid="2991364240020736760">"Scorciatoie applicazioni"</string>
+ <!-- outdated translation 9046797126882613707 --> <string name="applications_tab_label" msgid="2991364240020736760">"Scorciatoie applicazioni"</string>
<string name="wallpapers_temp_tab_text" msgid="1660218201190495279">"Questa sarà la scheda degli sfondi"</string>
<string name="all_apps_tab_all" msgid="2942727589595027258">"Tutte"</string>
<string name="all_apps_tab_apps" msgid="5468972551904071712">"Applicazioni"</string>
<string name="all_apps_tab_games" msgid="1855736784923494918">"Giochi"</string>
- <!-- outdated translation 7753043607780556423 --> <string name="all_apps_tab_downloaded" msgid="1488049110598641387">"Scaricate"</string>
+ <!-- outdated translation 3335316755603669951 --> <string name="all_apps_tab_downloaded" msgid="1488049110598641387">"Le mie applicazioni"</string>
<string name="all_apps_no_games" msgid="5293893733372793696">"Nessun gioco trovato."</string>
<string name="all_apps_no_downloads" msgid="2284720393234453761">"Non hai applicazioni scaricate."</string>
<string name="external_drop_widget_error" msgid="4976816434597126575">"Impossibile rilasciare elemento in schermata Home"</string>
diff --git a/res/values-iw/strings.xml b/res/values-iw/strings.xml
index 7b1a15c..cf38fc0 100644
--- a/res/values-iw/strings.xml
+++ b/res/values-iw/strings.xml
@@ -31,12 +31,12 @@
<string name="folders_tab_label" msgid="1145293785541489736">"תיקיות"</string>
<string name="shortcuts_tab_label" msgid="8640731503933155644">"עוד"</string>
<string name="wallpapers_tab_label" msgid="1617804870364119879">"טפטים"</string>
- <!-- outdated translation 7756968120518062632 --> <string name="applications_tab_label" msgid="2991364240020736760">"קיצורי דרך של יישומים"</string>
+ <!-- outdated translation 9046797126882613707 --> <string name="applications_tab_label" msgid="2991364240020736760">"קיצורי דרך של יישומים"</string>
<string name="wallpapers_temp_tab_text" msgid="1660218201190495279">"זו תהיה כרטיסיית הטפטים"</string>
<string name="all_apps_tab_all" msgid="2942727589595027258">"הכל"</string>
<string name="all_apps_tab_apps" msgid="5468972551904071712">"יישומים"</string>
<string name="all_apps_tab_games" msgid="1855736784923494918">"משחקים"</string>
- <!-- outdated translation 7753043607780556423 --> <string name="all_apps_tab_downloaded" msgid="1488049110598641387">"הורדו"</string>
+ <!-- outdated translation 3335316755603669951 --> <string name="all_apps_tab_downloaded" msgid="1488049110598641387">"היישומים שלי"</string>
<string name="all_apps_no_games" msgid="5293893733372793696">"לא נמצאו משחקים."</string>
<string name="all_apps_no_downloads" msgid="2284720393234453761">"לא הורדת יישומים."</string>
<string name="external_drop_widget_error" msgid="4976816434597126575">"אין אפשרות להניח פריט במסך בית זה"</string>
diff --git a/res/values-ja/strings.xml b/res/values-ja/strings.xml
index 101ea6d..bfc7d03 100644
--- a/res/values-ja/strings.xml
+++ b/res/values-ja/strings.xml
@@ -31,12 +31,12 @@
<string name="folders_tab_label" msgid="1145293785541489736">"フォルダ"</string>
<string name="shortcuts_tab_label" msgid="8640731503933155644">"その他"</string>
<string name="wallpapers_tab_label" msgid="1617804870364119879">"壁紙"</string>
- <!-- outdated translation 7756968120518062632 --> <string name="applications_tab_label" msgid="2991364240020736760">"アプリのショートカット"</string>
+ <!-- outdated translation 9046797126882613707 --> <string name="applications_tab_label" msgid="2991364240020736760">"アプリのショートカット"</string>
<string name="wallpapers_temp_tab_text" msgid="1660218201190495279">"ここが壁紙タブになります"</string>
<string name="all_apps_tab_all" msgid="2942727589595027258">"すべて"</string>
<string name="all_apps_tab_apps" msgid="5468972551904071712">"アプリ"</string>
<string name="all_apps_tab_games" msgid="1855736784923494918">"ゲーム"</string>
- <!-- outdated translation 7753043607780556423 --> <string name="all_apps_tab_downloaded" msgid="1488049110598641387">"ダウンロード済み"</string>
+ <!-- outdated translation 3335316755603669951 --> <string name="all_apps_tab_downloaded" msgid="1488049110598641387">"マイアプリ"</string>
<string name="all_apps_no_games" msgid="5293893733372793696">"ゲームなし"</string>
<string name="all_apps_no_downloads" msgid="2284720393234453761">"ダウンロードしたアプリケーションはありません。"</string>
<string name="external_drop_widget_error" msgid="4976816434597126575">"このホーム画面にアイテムをドロップできませんでした"</string>
diff --git a/res/values-ko/strings.xml b/res/values-ko/strings.xml
index c056201..c386636 100644
--- a/res/values-ko/strings.xml
+++ b/res/values-ko/strings.xml
@@ -31,12 +31,12 @@
<string name="folders_tab_label" msgid="1145293785541489736">"폴더"</string>
<string name="shortcuts_tab_label" msgid="8640731503933155644">"더보기"</string>
<string name="wallpapers_tab_label" msgid="1617804870364119879">"배경화면"</string>
- <!-- outdated translation 7756968120518062632 --> <string name="applications_tab_label" msgid="2991364240020736760">"앱 바로가기"</string>
+ <!-- outdated translation 9046797126882613707 --> <string name="applications_tab_label" msgid="2991364240020736760">"앱 바로가기"</string>
<string name="wallpapers_temp_tab_text" msgid="1660218201190495279">"배경화면 탭이 됩니다."</string>
<string name="all_apps_tab_all" msgid="2942727589595027258">"모두"</string>
<string name="all_apps_tab_apps" msgid="5468972551904071712">"애플리케이션"</string>
<string name="all_apps_tab_games" msgid="1855736784923494918">"게임"</string>
- <!-- outdated translation 7753043607780556423 --> <string name="all_apps_tab_downloaded" msgid="1488049110598641387">"다운로드"</string>
+ <!-- outdated translation 3335316755603669951 --> <string name="all_apps_tab_downloaded" msgid="1488049110598641387">"내 애플리케이션"</string>
<string name="all_apps_no_games" msgid="5293893733372793696">"게임이 없습니다."</string>
<string name="all_apps_no_downloads" msgid="2284720393234453761">"다운로드한 애플리케이션이 없습니다."</string>
<string name="external_drop_widget_error" msgid="4976816434597126575">"홈 화면에 항목을 드롭할 수 없습니다."</string>
diff --git a/res/values-lt/strings.xml b/res/values-lt/strings.xml
index bb67115..413b29b 100644
--- a/res/values-lt/strings.xml
+++ b/res/values-lt/strings.xml
@@ -31,12 +31,12 @@
<string name="folders_tab_label" msgid="1145293785541489736">"Aplankai"</string>
<string name="shortcuts_tab_label" msgid="8640731503933155644">"Daugiau"</string>
<string name="wallpapers_tab_label" msgid="1617804870364119879">"Darbalaukio fonai"</string>
- <!-- outdated translation 7756968120518062632 --> <string name="applications_tab_label" msgid="2991364240020736760">"Spartieji programos klavišai"</string>
+ <!-- outdated translation 9046797126882613707 --> <string name="applications_tab_label" msgid="2991364240020736760">"Spartieji programos klavišai"</string>
<string name="wallpapers_temp_tab_text" msgid="1660218201190495279">"Tai bus darbalaukio fonų skirtukas"</string>
<string name="all_apps_tab_all" msgid="2942727589595027258">"Visos"</string>
<string name="all_apps_tab_apps" msgid="5468972551904071712">"Apps"</string>
<string name="all_apps_tab_games" msgid="1855736784923494918">"Žaidimai"</string>
- <!-- outdated translation 7753043607780556423 --> <string name="all_apps_tab_downloaded" msgid="1488049110598641387">"Atsisiųsta"</string>
+ <!-- outdated translation 3335316755603669951 --> <string name="all_apps_tab_downloaded" msgid="1488049110598641387">"Mano programos"</string>
<string name="all_apps_no_games" msgid="5293893733372793696">"Nerasta žaidimų."</string>
<string name="all_apps_no_downloads" msgid="2284720393234453761">"Neturite atsisiųstų programų."</string>
<string name="external_drop_widget_error" msgid="4976816434597126575">"Nepavyko pašalinti elemento šiame pagr. ekrane"</string>
diff --git a/res/values-lv/strings.xml b/res/values-lv/strings.xml
index 7a016a6..b6bdf25 100644
--- a/res/values-lv/strings.xml
+++ b/res/values-lv/strings.xml
@@ -31,12 +31,12 @@
<string name="folders_tab_label" msgid="1145293785541489736">"Mapes"</string>
<string name="shortcuts_tab_label" msgid="8640731503933155644">"Vairāk"</string>
<string name="wallpapers_tab_label" msgid="1617804870364119879">"Fona tapetes"</string>
- <!-- outdated translation 7756968120518062632 --> <string name="applications_tab_label" msgid="2991364240020736760">"Lietotnes saīsnes"</string>
+ <!-- outdated translation 9046797126882613707 --> <string name="applications_tab_label" msgid="2991364240020736760">"Lietotnes saīsnes"</string>
<string name="wallpapers_temp_tab_text" msgid="1660218201190495279">"Šī būs fona tapetes cilne"</string>
<string name="all_apps_tab_all" msgid="2942727589595027258">"Visas"</string>
<string name="all_apps_tab_apps" msgid="5468972551904071712">"Lietotnes"</string>
<string name="all_apps_tab_games" msgid="1855736784923494918">"Spēles"</string>
- <!-- outdated translation 7753043607780556423 --> <string name="all_apps_tab_downloaded" msgid="1488049110598641387">"Lejupielādētās"</string>
+ <!-- outdated translation 3335316755603669951 --> <string name="all_apps_tab_downloaded" msgid="1488049110598641387">"Manas lietotnes"</string>
<string name="all_apps_no_games" msgid="5293893733372793696">"Nav nevienas spēles."</string>
<string name="all_apps_no_downloads" msgid="2284720393234453761">"Nav ielādēta neviena lietojumprogramma."</string>
<string name="external_drop_widget_error" msgid="4976816434597126575">"Nevarēja nomest vienumu šajā sākumekrānā."</string>
diff --git a/res/values-nb/strings.xml b/res/values-nb/strings.xml
index bee708c..186f01f 100644
--- a/res/values-nb/strings.xml
+++ b/res/values-nb/strings.xml
@@ -31,12 +31,12 @@
<string name="folders_tab_label" msgid="1145293785541489736">"Mapper"</string>
<string name="shortcuts_tab_label" msgid="8640731503933155644">"Mer"</string>
<string name="wallpapers_tab_label" msgid="1617804870364119879">"Bakgrunner"</string>
- <!-- outdated translation 7756968120518062632 --> <string name="applications_tab_label" msgid="2991364240020736760">"Programsnarveier"</string>
+ <!-- outdated translation 9046797126882613707 --> <string name="applications_tab_label" msgid="2991364240020736760">"Programsnarveier"</string>
<string name="wallpapers_temp_tab_text" msgid="1660218201190495279">"Dette er nå bakgrunnsfanen"</string>
<string name="all_apps_tab_all" msgid="2942727589595027258">"Alle"</string>
<string name="all_apps_tab_apps" msgid="5468972551904071712">"Programmer"</string>
<string name="all_apps_tab_games" msgid="1855736784923494918">"Spill"</string>
- <!-- outdated translation 7753043607780556423 --> <string name="all_apps_tab_downloaded" msgid="1488049110598641387">"Nedlastet"</string>
+ <!-- outdated translation 3335316755603669951 --> <string name="all_apps_tab_downloaded" msgid="1488049110598641387">"Programmer"</string>
<string name="all_apps_no_games" msgid="5293893733372793696">"Finner ingen spill."</string>
<string name="all_apps_no_downloads" msgid="2284720393234453761">"Du har ingen nedlastede programmer."</string>
<string name="external_drop_widget_error" msgid="4976816434597126575">"Kunne ikke slippe elementet på denne startskjermen"</string>
diff --git a/res/values-nl/strings.xml b/res/values-nl/strings.xml
index fc379de..a3ad199 100644
--- a/res/values-nl/strings.xml
+++ b/res/values-nl/strings.xml
@@ -31,12 +31,12 @@
<string name="folders_tab_label" msgid="1145293785541489736">"Mappen"</string>
<string name="shortcuts_tab_label" msgid="8640731503933155644">"Meer"</string>
<string name="wallpapers_tab_label" msgid="1617804870364119879">"Achtergronden"</string>
- <!-- outdated translation 7756968120518062632 --> <string name="applications_tab_label" msgid="2991364240020736760">"Toepassingssnelkoppelingen"</string>
+ <!-- outdated translation 9046797126882613707 --> <string name="applications_tab_label" msgid="2991364240020736760">"Toepassingssnelkoppelingen"</string>
<string name="wallpapers_temp_tab_text" msgid="1660218201190495279">"Dit wordt het tabblad \'Achtergronden\'"</string>
<string name="all_apps_tab_all" msgid="2942727589595027258">"Alle"</string>
<string name="all_apps_tab_apps" msgid="5468972551904071712">"Toepassingen"</string>
<string name="all_apps_tab_games" msgid="1855736784923494918">"Games"</string>
- <!-- outdated translation 7753043607780556423 --> <string name="all_apps_tab_downloaded" msgid="1488049110598641387">"Gedownload"</string>
+ <!-- outdated translation 3335316755603669951 --> <string name="all_apps_tab_downloaded" msgid="1488049110598641387">"Mijn toepassingen"</string>
<string name="all_apps_no_games" msgid="5293893733372793696">"Geen games gevonden."</string>
<string name="all_apps_no_downloads" msgid="2284720393234453761">"U heeft geen gedownloade toepassingen."</string>
<string name="external_drop_widget_error" msgid="4976816434597126575">"Kan item niet neerzetten op dit startscherm"</string>
diff --git a/res/values-pl/strings.xml b/res/values-pl/strings.xml
index cfb01ad..8a21cba 100644
--- a/res/values-pl/strings.xml
+++ b/res/values-pl/strings.xml
@@ -31,12 +31,12 @@
<string name="folders_tab_label" msgid="1145293785541489736">"Foldery"</string>
<string name="shortcuts_tab_label" msgid="8640731503933155644">"Więcej"</string>
<string name="wallpapers_tab_label" msgid="1617804870364119879">"Tapety"</string>
- <!-- outdated translation 7756968120518062632 --> <string name="applications_tab_label" msgid="2991364240020736760">"Skróty do aplikacji"</string>
+ <!-- outdated translation 9046797126882613707 --> <string name="applications_tab_label" msgid="2991364240020736760">"Skróty do aplikacji"</string>
<string name="wallpapers_temp_tab_text" msgid="1660218201190495279">"To będzie karta tapet"</string>
<string name="all_apps_tab_all" msgid="2942727589595027258">"Wszystkie"</string>
<string name="all_apps_tab_apps" msgid="5468972551904071712">"Aplikacje"</string>
<string name="all_apps_tab_games" msgid="1855736784923494918">"Gry"</string>
- <!-- outdated translation 7753043607780556423 --> <string name="all_apps_tab_downloaded" msgid="1488049110598641387">"Pobrane"</string>
+ <!-- outdated translation 3335316755603669951 --> <string name="all_apps_tab_downloaded" msgid="1488049110598641387">"Moje aplikacje"</string>
<string name="all_apps_no_games" msgid="5293893733372793696">"Nie znaleziono gier."</string>
<string name="all_apps_no_downloads" msgid="2284720393234453761">"Nie masz żadnych pobranych aplikacji."</string>
<string name="external_drop_widget_error" msgid="4976816434597126575">"Nie można upuścić elementu na ekranie głównym"</string>
diff --git a/res/values-pt-rPT/strings.xml b/res/values-pt-rPT/strings.xml
index 5c7fc03..5a59b39 100644
--- a/res/values-pt-rPT/strings.xml
+++ b/res/values-pt-rPT/strings.xml
@@ -31,12 +31,12 @@
<string name="folders_tab_label" msgid="1145293785541489736">"Pastas"</string>
<string name="shortcuts_tab_label" msgid="8640731503933155644">"Mais"</string>
<string name="wallpapers_tab_label" msgid="1617804870364119879">"Imagens de fundo"</string>
- <!-- outdated translation 7756968120518062632 --> <string name="applications_tab_label" msgid="2991364240020736760">"Atalhos de aplicações"</string>
+ <!-- outdated translation 9046797126882613707 --> <string name="applications_tab_label" msgid="2991364240020736760">"Atalhos de aplicações"</string>
<string name="wallpapers_temp_tab_text" msgid="1660218201190495279">"Isto será o separador de imagens de fundo"</string>
<string name="all_apps_tab_all" msgid="2942727589595027258">"Todas"</string>
<string name="all_apps_tab_apps" msgid="5468972551904071712">"Aplicações"</string>
<string name="all_apps_tab_games" msgid="1855736784923494918">"Jogos"</string>
- <!-- outdated translation 7753043607780556423 --> <string name="all_apps_tab_downloaded" msgid="1488049110598641387">"Transferidas"</string>
+ <!-- outdated translation 3335316755603669951 --> <string name="all_apps_tab_downloaded" msgid="1488049110598641387">"As minhas aplicações"</string>
<string name="all_apps_no_games" msgid="5293893733372793696">"Sem jogos."</string>
<string name="all_apps_no_downloads" msgid="2284720393234453761">"Não existem aplicações transferidas."</string>
<string name="external_drop_widget_error" msgid="4976816434597126575">"Não foi possível largar o item neste ecrã inicial"</string>
diff --git a/res/values-pt/strings.xml b/res/values-pt/strings.xml
index 6ec95ad..2e6611e 100644
--- a/res/values-pt/strings.xml
+++ b/res/values-pt/strings.xml
@@ -31,12 +31,12 @@
<string name="folders_tab_label" msgid="1145293785541489736">"Pastas"</string>
<string name="shortcuts_tab_label" msgid="8640731503933155644">"Mais"</string>
<string name="wallpapers_tab_label" msgid="1617804870364119879">"Papéis de parede"</string>
- <!-- outdated translation 7756968120518062632 --> <string name="applications_tab_label" msgid="2991364240020736760">"Atalhos de aplicativo"</string>
+ <!-- outdated translation 9046797126882613707 --> <string name="applications_tab_label" msgid="2991364240020736760">"Atalhos de aplicativo"</string>
<string name="wallpapers_temp_tab_text" msgid="1660218201190495279">"Esta será a guia de papéis de parede"</string>
<string name="all_apps_tab_all" msgid="2942727589595027258">"Todos"</string>
<string name="all_apps_tab_apps" msgid="5468972551904071712">"Aplicativos"</string>
<string name="all_apps_tab_games" msgid="1855736784923494918">"Jogos"</string>
- <!-- outdated translation 7753043607780556423 --> <string name="all_apps_tab_downloaded" msgid="1488049110598641387">"Download concluído"</string>
+ <!-- outdated translation 3335316755603669951 --> <string name="all_apps_tab_downloaded" msgid="1488049110598641387">"Meus Aplicativos"</string>
<string name="all_apps_no_games" msgid="5293893733372793696">"Nenhum jogo encontrado."</string>
<string name="all_apps_no_downloads" msgid="2284720393234453761">"Você não tem nenhum aplicativo transferido."</string>
<string name="external_drop_widget_error" msgid="4976816434597126575">"Não foi possível soltar o item nesta tela inicial"</string>
diff --git a/res/values-ro/strings.xml b/res/values-ro/strings.xml
index ed55b00..1abba7a 100644
--- a/res/values-ro/strings.xml
+++ b/res/values-ro/strings.xml
@@ -31,12 +31,12 @@
<string name="folders_tab_label" msgid="1145293785541489736">"Dosare"</string>
<string name="shortcuts_tab_label" msgid="8640731503933155644">"Mai multe"</string>
<string name="wallpapers_tab_label" msgid="1617804870364119879">"Imagini de fundal"</string>
- <!-- outdated translation 7756968120518062632 --> <string name="applications_tab_label" msgid="2991364240020736760">"Comenzi rapide aplicaţii"</string>
+ <!-- outdated translation 9046797126882613707 --> <string name="applications_tab_label" msgid="2991364240020736760">"Comenzi rapide aplicaţii"</string>
<string name="wallpapers_temp_tab_text" msgid="1660218201190495279">"Aceasta va fi fila pentru imagini de fundal"</string>
<string name="all_apps_tab_all" msgid="2942727589595027258">"Toate"</string>
<string name="all_apps_tab_apps" msgid="5468972551904071712">"Aplicaţii"</string>
<string name="all_apps_tab_games" msgid="1855736784923494918">"Jocuri"</string>
- <!-- outdated translation 7753043607780556423 --> <string name="all_apps_tab_downloaded" msgid="1488049110598641387">"Descărcate"</string>
+ <!-- outdated translation 3335316755603669951 --> <string name="all_apps_tab_downloaded" msgid="1488049110598641387">"Aplicaţiile mele"</string>
<string name="all_apps_no_games" msgid="5293893733372793696">"Nu s-au găsit jocuri."</string>
<string name="all_apps_no_downloads" msgid="2284720393234453761">"Nu aveţi aplicaţii descărcate"</string>
<string name="external_drop_widget_error" msgid="4976816434597126575">"Impos. de plasat elem. pe acest ecran de pornire"</string>
diff --git a/res/values-ru/strings.xml b/res/values-ru/strings.xml
index 459e580..a62dfa2 100644
--- a/res/values-ru/strings.xml
+++ b/res/values-ru/strings.xml
@@ -31,12 +31,12 @@
<string name="folders_tab_label" msgid="1145293785541489736">"Папки"</string>
<string name="shortcuts_tab_label" msgid="8640731503933155644">"Ещё"</string>
<string name="wallpapers_tab_label" msgid="1617804870364119879">"Обои"</string>
- <!-- outdated translation 7756968120518062632 --> <string name="applications_tab_label" msgid="2991364240020736760">"Ярлыки приложений"</string>
+ <!-- outdated translation 9046797126882613707 --> <string name="applications_tab_label" msgid="2991364240020736760">"Ярлыки приложений"</string>
<string name="wallpapers_temp_tab_text" msgid="1660218201190495279">"Это будет вкладка обоев"</string>
<string name="all_apps_tab_all" msgid="2942727589595027258">"Все"</string>
<string name="all_apps_tab_apps" msgid="5468972551904071712">"Приложения"</string>
<string name="all_apps_tab_games" msgid="1855736784923494918">"Игры"</string>
- <!-- outdated translation 7753043607780556423 --> <string name="all_apps_tab_downloaded" msgid="1488049110598641387">"Загруженные"</string>
+ <!-- outdated translation 3335316755603669951 --> <string name="all_apps_tab_downloaded" msgid="1488049110598641387">"Мои приложения"</string>
<string name="all_apps_no_games" msgid="5293893733372793696">"Игр не найдено."</string>
<string name="all_apps_no_downloads" msgid="2284720393234453761">"У вас нет загруженных приложений."</string>
<string name="external_drop_widget_error" msgid="4976816434597126575">"Не удается скопировать элемент на главный экран"</string>
diff --git a/res/values-sk/strings.xml b/res/values-sk/strings.xml
index d4bdff5..ebdf139 100644
--- a/res/values-sk/strings.xml
+++ b/res/values-sk/strings.xml
@@ -31,12 +31,12 @@
<string name="folders_tab_label" msgid="1145293785541489736">"Priečinky"</string>
<string name="shortcuts_tab_label" msgid="8640731503933155644">"Viac"</string>
<string name="wallpapers_tab_label" msgid="1617804870364119879">"Tapety"</string>
- <!-- outdated translation 7756968120518062632 --> <string name="applications_tab_label" msgid="2991364240020736760">"Odkazy aplikácií"</string>
+ <!-- outdated translation 9046797126882613707 --> <string name="applications_tab_label" msgid="2991364240020736760">"Odkazy aplikácií"</string>
<string name="wallpapers_temp_tab_text" msgid="1660218201190495279">"Toto bude karta Tapety"</string>
<string name="all_apps_tab_all" msgid="2942727589595027258">"Všetky"</string>
<string name="all_apps_tab_apps" msgid="5468972551904071712">"Aplikácie"</string>
<string name="all_apps_tab_games" msgid="1855736784923494918">"Hry"</string>
- <!-- outdated translation 7753043607780556423 --> <string name="all_apps_tab_downloaded" msgid="1488049110598641387">"Prevzaté"</string>
+ <!-- outdated translation 3335316755603669951 --> <string name="all_apps_tab_downloaded" msgid="1488049110598641387">"Moje aplikácie"</string>
<string name="all_apps_no_games" msgid="5293893733372793696">"Nenašli sa žiadne hry."</string>
<string name="all_apps_no_downloads" msgid="2284720393234453761">"Nemáte žiadne prevzaté aplikácie."</string>
<string name="external_drop_widget_error" msgid="4976816434597126575">"Položku sa nepodarilo pretiahnuť na túto plochu"</string>
diff --git a/res/values-sl/strings.xml b/res/values-sl/strings.xml
index c119134..97a96a1 100644
--- a/res/values-sl/strings.xml
+++ b/res/values-sl/strings.xml
@@ -31,12 +31,12 @@
<string name="folders_tab_label" msgid="1145293785541489736">"Mape"</string>
<string name="shortcuts_tab_label" msgid="8640731503933155644">"Več"</string>
<string name="wallpapers_tab_label" msgid="1617804870364119879">"Ozadja"</string>
- <!-- outdated translation 7756968120518062632 --> <string name="applications_tab_label" msgid="2991364240020736760">"Bližnjice do programov"</string>
+ <!-- outdated translation 9046797126882613707 --> <string name="applications_tab_label" msgid="2991364240020736760">"Bližnjice do programov"</string>
<string name="wallpapers_temp_tab_text" msgid="1660218201190495279">"To bo zavihek ozadij"</string>
<string name="all_apps_tab_all" msgid="2942727589595027258">"Vse"</string>
<string name="all_apps_tab_apps" msgid="5468972551904071712">"Programi"</string>
<string name="all_apps_tab_games" msgid="1855736784923494918">"Igre"</string>
- <!-- outdated translation 7753043607780556423 --> <string name="all_apps_tab_downloaded" msgid="1488049110598641387">"Preneseno"</string>
+ <!-- outdated translation 3335316755603669951 --> <string name="all_apps_tab_downloaded" msgid="1488049110598641387">"Moji programi"</string>
<string name="all_apps_no_games" msgid="5293893733372793696">"Ni najdenih iger."</string>
<string name="all_apps_no_downloads" msgid="2284720393234453761">"Ni prenesenih programov."</string>
<string name="external_drop_widget_error" msgid="4976816434597126575">"Elementa ni bilo mogoče postaviti na ta začetni zaslon"</string>
diff --git a/res/values-sr/strings.xml b/res/values-sr/strings.xml
index a003f17..fbeea6b 100644
--- a/res/values-sr/strings.xml
+++ b/res/values-sr/strings.xml
@@ -31,12 +31,12 @@
<string name="folders_tab_label" msgid="1145293785541489736">"Директоријуми"</string>
<string name="shortcuts_tab_label" msgid="8640731503933155644">"Још"</string>
<string name="wallpapers_tab_label" msgid="1617804870364119879">"Позадине"</string>
- <!-- outdated translation 7756968120518062632 --> <string name="applications_tab_label" msgid="2991364240020736760">"Пречице за апликације"</string>
+ <!-- outdated translation 9046797126882613707 --> <string name="applications_tab_label" msgid="2991364240020736760">"Пречице за апликације"</string>
<string name="wallpapers_temp_tab_text" msgid="1660218201190495279">"Ово ће бити картица позадине"</string>
<string name="all_apps_tab_all" msgid="2942727589595027258">"Све"</string>
<string name="all_apps_tab_apps" msgid="5468972551904071712">"Apps"</string>
<string name="all_apps_tab_games" msgid="1855736784923494918">"Игре"</string>
- <!-- outdated translation 7753043607780556423 --> <string name="all_apps_tab_downloaded" msgid="1488049110598641387">"Преузето"</string>
+ <!-- outdated translation 3335316755603669951 --> <string name="all_apps_tab_downloaded" msgid="1488049110598641387">"Моје апликације"</string>
<string name="all_apps_no_games" msgid="5293893733372793696">"Нису пронађене игре."</string>
<string name="all_apps_no_downloads" msgid="2284720393234453761">"Немате ниједну преузету апликацију."</string>
<string name="external_drop_widget_error" msgid="4976816434597126575">"Ставка није пребачена на овај почетни екран"</string>
diff --git a/res/values-sv/strings.xml b/res/values-sv/strings.xml
index 654eb72..9eb8df9 100644
--- a/res/values-sv/strings.xml
+++ b/res/values-sv/strings.xml
@@ -31,14 +31,14 @@
<string name="folders_tab_label" msgid="1145293785541489736">"Mappar"</string>
<string name="shortcuts_tab_label" msgid="8640731503933155644">"Mer"</string>
<string name="wallpapers_tab_label" msgid="1617804870364119879">"Bakgrundsbilder"</string>
- <!-- outdated translation 7756968120518062632 --> <string name="applications_tab_label" msgid="2991364240020736760">"Genvägar för appar"</string>
+ <!-- outdated translation 9046797126882613707 --> <string name="applications_tab_label" msgid="2991364240020736760">"Genvägar för appar"</string>
<string name="wallpapers_temp_tab_text" msgid="1660218201190495279">"Det här kommer att vara fliken för bakgrundsbilder"</string>
<string name="all_apps_tab_all" msgid="2942727589595027258">"Alla"</string>
<string name="all_apps_tab_apps" msgid="5468972551904071712">"Appar"</string>
<string name="all_apps_tab_games" msgid="1855736784923494918">"Spel"</string>
- <!-- outdated translation 7753043607780556423 --> <string name="all_apps_tab_downloaded" msgid="1488049110598641387">"Hämtade"</string>
+ <!-- outdated translation 2300935549064726963 --> <string name="all_apps_tab_downloaded" msgid="1488049110598641387">"Hämtade"</string>
<string name="all_apps_no_games" msgid="5293893733372793696">"Inga spel hittades."</string>
- <!-- outdated translation 6687010155766000796 --> <string name="all_apps_no_downloads" msgid="2284720393234453761">"Inga hämtade appar."</string>
+ <!-- outdated translation 6145042636084482299 --> <string name="all_apps_no_downloads" msgid="2284720393234453761">"Inga hämtade appar."</string>
<string name="external_drop_widget_error" msgid="4976816434597126575">"Objektet kunde inte släppas på den här startsidan"</string>
<string name="external_drop_widget_pick_title" msgid="4481311720134376218">"Välj en widget att skapa"</string>
<string name="rename_folder_label" msgid="5646236631298452787">"Mappnamn"</string>
diff --git a/res/values-th/strings.xml b/res/values-th/strings.xml
index 26a7ef7..ee3b563 100644
--- a/res/values-th/strings.xml
+++ b/res/values-th/strings.xml
@@ -31,12 +31,12 @@
<string name="folders_tab_label" msgid="1145293785541489736">"โฟลเดอร์"</string>
<string name="shortcuts_tab_label" msgid="8640731503933155644">"เพิ่มเติม"</string>
<string name="wallpapers_tab_label" msgid="1617804870364119879">"วอลเปเปอร์"</string>
- <!-- outdated translation 7756968120518062632 --> <string name="applications_tab_label" msgid="2991364240020736760">"ทางลัดของแอปพลิเคชัน"</string>
+ <!-- outdated translation 9046797126882613707 --> <string name="applications_tab_label" msgid="2991364240020736760">"ทางลัดของแอปพลิเคชัน"</string>
<string name="wallpapers_temp_tab_text" msgid="1660218201190495279">"นี่จะเป็นแท็บวอลเปเปอร์"</string>
<string name="all_apps_tab_all" msgid="2942727589595027258">"ทั้งหมด"</string>
<string name="all_apps_tab_apps" msgid="5468972551904071712">"แอปพลิเคชัน"</string>
<string name="all_apps_tab_games" msgid="1855736784923494918">"เกม"</string>
- <!-- outdated translation 7753043607780556423 --> <string name="all_apps_tab_downloaded" msgid="1488049110598641387">"ดาวน์โหลดแล้ว"</string>
+ <!-- outdated translation 3335316755603669951 --> <string name="all_apps_tab_downloaded" msgid="1488049110598641387">"แอปพลิเคชันของฉัน"</string>
<string name="all_apps_no_games" msgid="5293893733372793696">"ไม่พบเกม"</string>
<string name="all_apps_no_downloads" msgid="2284720393234453761">"คุณไม่ได้ดาวน์โหลดแอปพลิเคชันไว้"</string>
<string name="external_drop_widget_error" msgid="4976816434597126575">"ไม่สามารถวางรายการลงในหน้าจอหลักนี้ได้"</string>
diff --git a/res/values-tl/strings.xml b/res/values-tl/strings.xml
index ce10398..67212cb 100644
--- a/res/values-tl/strings.xml
+++ b/res/values-tl/strings.xml
@@ -31,12 +31,12 @@
<string name="folders_tab_label" msgid="1145293785541489736">"Mga Folder"</string>
<string name="shortcuts_tab_label" msgid="8640731503933155644">"Higit pa"</string>
<string name="wallpapers_tab_label" msgid="1617804870364119879">"Mga Wallpaper"</string>
- <!-- outdated translation 7756968120518062632 --> <string name="applications_tab_label" msgid="2991364240020736760">"Mga Shortcut ng App"</string>
+ <!-- outdated translation 9046797126882613707 --> <string name="applications_tab_label" msgid="2991364240020736760">"Mga Shortcut ng App"</string>
<string name="wallpapers_temp_tab_text" msgid="1660218201190495279">"Ito ang magiging tab ng mga wallpaper"</string>
<string name="all_apps_tab_all" msgid="2942727589595027258">"Lahat"</string>
<string name="all_apps_tab_apps" msgid="5468972551904071712">"Apps"</string>
<string name="all_apps_tab_games" msgid="1855736784923494918">"Mga Laro"</string>
- <!-- outdated translation 7753043607780556423 --> <string name="all_apps_tab_downloaded" msgid="1488049110598641387">"Na-download"</string>
+ <!-- outdated translation 3335316755603669951 --> <string name="all_apps_tab_downloaded" msgid="1488049110598641387">"Aking Mga App"</string>
<string name="all_apps_no_games" msgid="5293893733372793696">"Walang nakitang mga laro."</string>
<string name="all_apps_no_downloads" msgid="2284720393234453761">"Wala kang mga na-download na application."</string>
<string name="external_drop_widget_error" msgid="4976816434597126575">"Hindi ma-drop ang item sa homescreen na ito"</string>
diff --git a/res/values-tr/strings.xml b/res/values-tr/strings.xml
index 9827699..79e67c0 100644
--- a/res/values-tr/strings.xml
+++ b/res/values-tr/strings.xml
@@ -31,12 +31,12 @@
<string name="folders_tab_label" msgid="1145293785541489736">"Klasörler"</string>
<string name="shortcuts_tab_label" msgid="8640731503933155644">"Diğer"</string>
<string name="wallpapers_tab_label" msgid="1617804870364119879">"Duvar Kağıtları"</string>
- <!-- outdated translation 7756968120518062632 --> <string name="applications_tab_label" msgid="2991364240020736760">"Uygulama Kısayolları"</string>
+ <!-- outdated translation 9046797126882613707 --> <string name="applications_tab_label" msgid="2991364240020736760">"Uygulama Kısayolları"</string>
<string name="wallpapers_temp_tab_text" msgid="1660218201190495279">"Bu duvar kağıdı sekmesi olacaktır"</string>
<string name="all_apps_tab_all" msgid="2942727589595027258">"Tümü"</string>
<string name="all_apps_tab_apps" msgid="5468972551904071712">"Uygulamalar"</string>
<string name="all_apps_tab_games" msgid="1855736784923494918">"Oyunlar"</string>
- <!-- outdated translation 7753043607780556423 --> <string name="all_apps_tab_downloaded" msgid="1488049110598641387">"İndirilenler"</string>
+ <!-- outdated translation 3335316755603669951 --> <string name="all_apps_tab_downloaded" msgid="1488049110598641387">"Uygulamalarım"</string>
<string name="all_apps_no_games" msgid="5293893733372793696">"Oyun bulunamadı."</string>
<string name="all_apps_no_downloads" msgid="2284720393234453761">"İndirilmiş uygulamanız yok."</string>
<string name="external_drop_widget_error" msgid="4976816434597126575">"Öğe bu ana ekrana bırakılamadı"</string>
diff --git a/res/values-uk/strings.xml b/res/values-uk/strings.xml
index 5a319f8..55b39e1 100644
--- a/res/values-uk/strings.xml
+++ b/res/values-uk/strings.xml
@@ -31,12 +31,12 @@
<string name="folders_tab_label" msgid="1145293785541489736">"Папки"</string>
<string name="shortcuts_tab_label" msgid="8640731503933155644">"Більше"</string>
<string name="wallpapers_tab_label" msgid="1617804870364119879">"Фонові мал."</string>
- <!-- outdated translation 7756968120518062632 --> <string name="applications_tab_label" msgid="2991364240020736760">"Ярлики програм"</string>
+ <!-- outdated translation 9046797126882613707 --> <string name="applications_tab_label" msgid="2991364240020736760">"Ярлики програм"</string>
<string name="wallpapers_temp_tab_text" msgid="1660218201190495279">"This will be the wallpapers tab"</string>
<string name="all_apps_tab_all" msgid="2942727589595027258">"Усі"</string>
<string name="all_apps_tab_apps" msgid="5468972551904071712">"Програми"</string>
<string name="all_apps_tab_games" msgid="1855736784923494918">"Ігри"</string>
- <!-- outdated translation 7753043607780556423 --> <string name="all_apps_tab_downloaded" msgid="1488049110598641387">"Завантажені"</string>
+ <!-- outdated translation 3335316755603669951 --> <string name="all_apps_tab_downloaded" msgid="1488049110598641387">"Мої програми"</string>
<string name="all_apps_no_games" msgid="5293893733372793696">"Ігор не знайдено."</string>
<string name="all_apps_no_downloads" msgid="2284720393234453761">"У вас немає завантажених програм."</string>
<string name="external_drop_widget_error" msgid="4976816434597126575">"Неможливо помістити елемент на цей головний екран"</string>
diff --git a/res/values-vi/strings.xml b/res/values-vi/strings.xml
index 3277c07..06a7a3f 100644
--- a/res/values-vi/strings.xml
+++ b/res/values-vi/strings.xml
@@ -31,12 +31,12 @@
<string name="folders_tab_label" msgid="1145293785541489736">"Thư mục"</string>
<string name="shortcuts_tab_label" msgid="8640731503933155644">"Khác"</string>
<string name="wallpapers_tab_label" msgid="1617804870364119879">"Hình nền"</string>
- <!-- outdated translation 7756968120518062632 --> <string name="applications_tab_label" msgid="2991364240020736760">"Lối tắt ứng dụng"</string>
+ <!-- outdated translation 9046797126882613707 --> <string name="applications_tab_label" msgid="2991364240020736760">"Lối tắt ứng dụng"</string>
<string name="wallpapers_temp_tab_text" msgid="1660218201190495279">"Đây sẽ là tab hình nền"</string>
<string name="all_apps_tab_all" msgid="2942727589595027258">"Tất cả"</string>
<string name="all_apps_tab_apps" msgid="5468972551904071712">"Ứng dụng"</string>
<string name="all_apps_tab_games" msgid="1855736784923494918">"Trò chơi"</string>
- <!-- outdated translation 7753043607780556423 --> <string name="all_apps_tab_downloaded" msgid="1488049110598641387">"Đã tải xuống"</string>
+ <!-- outdated translation 3335316755603669951 --> <string name="all_apps_tab_downloaded" msgid="1488049110598641387">"ƯD của tôi"</string>
<string name="all_apps_no_games" msgid="5293893733372793696">"Không tìm thấy trò chơi."</string>
<string name="all_apps_no_downloads" msgid="2284720393234453761">"Bạn không có ứng dụng nào được tải xuống."</string>
<string name="external_drop_widget_error" msgid="4976816434597126575">"Không thể thả mục vào màn hình chính này"</string>
diff --git a/res/values-xlarge/config.xml b/res/values-xlarge/config.xml
index dc9d096..900fbba 100644
--- a/res/values-xlarge/config.xml
+++ b/res/values-xlarge/config.xml
@@ -35,7 +35,6 @@
<!-- Duration in milliseconds of the animations between all apps, customize, & home.
NOTE: If these are changed, the toolbar animation times below should also be. -->
- <integer name="config_allAppsCameraPanTime">700</integer>
<integer name="config_allAppsFadeOutTime">500</integer>
<integer name="config_customizeWorkspaceShrinkTime">800</integer>
<integer name="config_allAppsWorkspaceShrinkTime">1450</integer>
@@ -66,12 +65,6 @@
<integer name="config_screenOnDropAlphaFadeDelay">350</integer>
<integer name="config_screenOnDropAlphaFadeDuration">50</integer>
- <!-- Workspace screens are cached to bitmaps only when they're smaller than a certain size
- (maxScaleForUsingWorkspaceScreenBitmapCache), since the bitmap cache itself is smaller
- than the view itself (workspaceScreenBitmapCacheScale) -->
- <integer name="config_workspaceScreenBitmapCacheScale">20</integer>
- <integer name="config_maxScaleForUsingWorkspaceScreenBitmapCache">50</integer>
-
<!-- The slope, in percent, of the drag movement needed to drag an item out of the customization
drawer (y / x * 100%) -->
<integer name="config_customizationDrawerDragSlopeThreshold">150</integer>
diff --git a/res/values-zh-rCN/strings.xml b/res/values-zh-rCN/strings.xml
index a4d262c..98ed69d 100644
--- a/res/values-zh-rCN/strings.xml
+++ b/res/values-zh-rCN/strings.xml
@@ -31,12 +31,12 @@
<string name="folders_tab_label" msgid="1145293785541489736">"文件夹"</string>
<string name="shortcuts_tab_label" msgid="8640731503933155644">"更多"</string>
<string name="wallpapers_tab_label" msgid="1617804870364119879">"壁纸"</string>
- <!-- outdated translation 7756968120518062632 --> <string name="applications_tab_label" msgid="2991364240020736760">"应用程序快捷方式"</string>
+ <!-- outdated translation 9046797126882613707 --> <string name="applications_tab_label" msgid="2991364240020736760">"应用程序快捷方式"</string>
<string name="wallpapers_temp_tab_text" msgid="1660218201190495279">"这将会成为壁纸标签"</string>
<string name="all_apps_tab_all" msgid="2942727589595027258">"全部"</string>
<string name="all_apps_tab_apps" msgid="5468972551904071712">"应用程序"</string>
<string name="all_apps_tab_games" msgid="1855736784923494918">"游戏"</string>
- <!-- outdated translation 7753043607780556423 --> <string name="all_apps_tab_downloaded" msgid="1488049110598641387">"已下载"</string>
+ <!-- outdated translation 3335316755603669951 --> <string name="all_apps_tab_downloaded" msgid="1488049110598641387">"我的应用程序"</string>
<string name="all_apps_no_games" msgid="5293893733372793696">"未找到游戏。"</string>
<string name="all_apps_no_downloads" msgid="2284720393234453761">"您没有下载任何应用程序。"</string>
<string name="external_drop_widget_error" msgid="4976816434597126575">"无法将该项放到主屏幕上"</string>
diff --git a/res/values-zh-rTW/strings.xml b/res/values-zh-rTW/strings.xml
index 2481c2c..3ddfbe8 100644
--- a/res/values-zh-rTW/strings.xml
+++ b/res/values-zh-rTW/strings.xml
@@ -31,12 +31,12 @@
<string name="folders_tab_label" msgid="1145293785541489736">"資料夾"</string>
<string name="shortcuts_tab_label" msgid="8640731503933155644">"更多選項"</string>
<string name="wallpapers_tab_label" msgid="1617804870364119879">"桌布"</string>
- <!-- outdated translation 7756968120518062632 --> <string name="applications_tab_label" msgid="2991364240020736760">"應用程式捷徑"</string>
+ <!-- outdated translation 9046797126882613707 --> <string name="applications_tab_label" msgid="2991364240020736760">"應用程式捷徑"</string>
<string name="wallpapers_temp_tab_text" msgid="1660218201190495279">"桌布標籤保留位"</string>
<string name="all_apps_tab_all" msgid="2942727589595027258">"全部"</string>
<string name="all_apps_tab_apps" msgid="5468972551904071712">"應用程式"</string>
<string name="all_apps_tab_games" msgid="1855736784923494918">"遊戲"</string>
- <!-- outdated translation 7753043607780556423 --> <string name="all_apps_tab_downloaded" msgid="1488049110598641387">"已下載"</string>
+ <!-- outdated translation 3335316755603669951 --> <string name="all_apps_tab_downloaded" msgid="1488049110598641387">"我的應用程式"</string>
<string name="all_apps_no_games" msgid="5293893733372793696">"找不到遊戲。"</string>
<string name="all_apps_no_downloads" msgid="2284720393234453761">"您沒有下載任何應用程式。"</string>
<string name="external_drop_widget_error" msgid="4976816434597126575">"無法將項目拖放至主螢幕上"</string>
diff --git a/res/values/config.xml b/res/values/config.xml
index 850c609..c56a8ce 100644
--- a/res/values/config.xml
+++ b/res/values/config.xml
@@ -25,12 +25,6 @@
<!-- The alpha value at which to show the most recent drop visualization outline. -->
<integer name="config_dragOutlineMaxAlpha">128</integer>
- <!-- Workspace screens are cached to bitmaps only when they're smaller than a certain size
- (maxScaleForUsingWorkspaceScreenBitmapCache), since the bitmap cache it self is smaller
- than the view itself (workspaceScreenBitmapCacheScale) -->
- <integer name="config_workspaceScreenBitmapCacheScale">20</integer>
- <integer name="config_maxScaleForUsingWorkspaceScreenBitmapCache">50</integer>
-
<!-- Parameters controlling the animation for when an item is dropped on the home screen,
and it animates from its old position to the new one. -->
@@ -39,6 +33,12 @@
<!-- The distance at which the animation should take the max duration -->
<integer name="config_dropAnimMaxDist">800</integer>
+ <!-- Workspace screens are cached to bitmaps only when they're smaller than a certain size
+ (maxScaleForUsingWorkspaceScreenBitmapCache), since the bitmap cache itself is smaller
+ than the view itself (workspaceScreenBitmapCacheScale) -->
+ <integer name="config_workspaceScreenBitmapCacheScale">20</integer>
+ <integer name="config_maxScaleForUsingWorkspaceScreenBitmapCache">50</integer>
+
<style name="config_orientation">
<item name="@android:screenOrientation">nosensor</item>
</style>
diff --git a/src/com/android/launcher2/AllApps2D.java b/src/com/android/launcher2/AllApps2D.java
index 66d9395..a9423be 100644
--- a/src/com/android/launcher2/AllApps2D.java
+++ b/src/com/android/launcher2/AllApps2D.java
@@ -211,7 +211,7 @@ public class AllApps2D
}
@Override
- public void onDropCompleted(View target, boolean success) {
+ public void onDropCompleted(View target, Object dragInfo, boolean success) {
}
/**
diff --git a/src/com/android/launcher2/AllApps3D.java b/src/com/android/launcher2/AllApps3D.java
index 2ecf761..29f49af 100644
--- a/src/com/android/launcher2/AllApps3D.java
+++ b/src/com/android/launcher2/AllApps3D.java
@@ -685,16 +685,14 @@ public class AllApps3D extends RSSurfaceView
&& mCurrentIconIndex >= 0 && mCurrentIconIndex < mAllAppsList.size()) {
ApplicationInfo app = mAllAppsList.get(mCurrentIconIndex);
- Bitmap bmp = app.iconBitmap;
- final int w = bmp.getWidth();
- final int h = bmp.getHeight();
+ final Bitmap bmp = app.iconBitmap;
// We don't really have an accurate location to use. This will do.
- int screenX = mMotionDownRawX - (w / 2);
- int screenY = mMotionDownRawY - h;
+ int screenX = mMotionDownRawX - (bmp.getWidth() / 2);
+ int screenY = mMotionDownRawY - bmp.getHeight();
- mDragController.startDrag(bmp, screenX, screenY,
- 0, 0, w, h, this, app, DragController.DRAG_ACTION_COPY);
+ mDragController.startDrag(
+ bmp, screenX, screenY, this, app, DragController.DRAG_ACTION_COPY);
mLauncher.closeAllApps(true);
}
@@ -748,7 +746,7 @@ public class AllApps3D extends RSSurfaceView
}
@Override
- public void onDropCompleted(View target, boolean success) {
+ public void onDropCompleted(View target, Object dragInfo, boolean success) {
}
/**
diff --git a/src/com/android/launcher2/AllAppsPagedView.java b/src/com/android/launcher2/AllAppsPagedView.java
index daa5d64..e926974 100644
--- a/src/com/android/launcher2/AllAppsPagedView.java
+++ b/src/com/android/launcher2/AllAppsPagedView.java
@@ -282,7 +282,7 @@ public class AllAppsPagedView extends PagedViewWithDraggableItems implements All
}
@Override
- public void onDropCompleted(View target, boolean success) {
+ public void onDropCompleted(View target, Object dragInfo, boolean success) {
// close the choice action mode if we have a proper drop
if (target != this) {
endChoiceMode();
@@ -515,6 +515,7 @@ public class AllAppsPagedView extends PagedViewWithDraggableItems implements All
layout.addViewToCellLayout(icon, -1, 0,
new PagedViewCellLayout.LayoutParams(0, 0, 4, 1));
}
+ layout.createHardwareLayers();
}
/*
diff --git a/src/com/android/launcher2/BubbleTextView.java b/src/com/android/launcher2/BubbleTextView.java
index ad01fac..3ef0546 100644
--- a/src/com/android/launcher2/BubbleTextView.java
+++ b/src/com/android/launcher2/BubbleTextView.java
@@ -66,6 +66,8 @@ public class BubbleTextView extends TextView implements VisibilityChangedBroadca
private boolean mBackgroundSizeChanged;
private Drawable mBackground;
+ private boolean mStayPressed;
+
private VisibilityChangedListener mOnVisibilityChangedListener;
public BubbleTextView(Context context) {
@@ -124,27 +126,37 @@ public class BubbleTextView extends TextView implements VisibilityChangedBroadca
return who == mBackground || super.verifyDrawable(who);
}
+ private void invalidatePressedOrFocusedBackground() {
+ int padding = HolographicOutlineHelper.MAX_OUTER_BLUR_RADIUS / 2;
+ ((View)getParent()).invalidate(getLeft() - padding, getTop() - padding,
+ getRight() + padding, getBottom() + padding);
+ invalidate();
+ }
+
@Override
protected void drawableStateChanged() {
if (isPressed()) {
// In this case, we have already created the pressed outline on ACTION_DOWN,
// so we just need to do an invalidate to trigger draw
if (!mDidInvalidateForPressedState) {
- invalidate();
+ invalidatePressedOrFocusedBackground();
}
} else {
// Otherwise, either clear the pressed/focused background, or create a background
// for the focused state
final boolean backgroundEmptyBefore = mPressedOrFocusedBackground == null;
- mPressedOrFocusedBackground = null;
+ if (!mStayPressed) {
+ mPressedOrFocusedBackground = null;
+ }
if (isFocused()) {
mPressedOrFocusedBackground = createGlowingOutline(
mTempCanvas, mFocusedGlowColor, mFocusedOutlineColor);
- invalidate();
+ mStayPressed = false;
+ invalidatePressedOrFocusedBackground();
}
final boolean backgroundEmptyNow = mPressedOrFocusedBackground == null;
if (!backgroundEmptyBefore && backgroundEmptyNow) {
- invalidate();
+ invalidatePressedOrFocusedBackground();
}
}
@@ -244,9 +256,16 @@ public class BubbleTextView extends TextView implements VisibilityChangedBroadca
super.onVisibilityChanged(changedView, visibility);
}
+ void setStayPressed(boolean stayPressed) {
+ mStayPressed = stayPressed;
+ if (!stayPressed) {
+ mPressedOrFocusedBackground = null;
+ }
+ invalidatePressedOrFocusedBackground();
+ }
@Override
public void draw(Canvas canvas) {
- if (mPressedOrFocusedBackground != null && (isPressed() || isFocused())) {
+ if (mPressedOrFocusedBackground != null && (isPressed() || isFocused() || mStayPressed)) {
// The blue glow can extend outside of our clip region, so we first temporarily expand
// the canvas's clip region
canvas.save(Canvas.CLIP_SAVE_FLAG);
diff --git a/src/com/android/launcher2/CustomizePagedView.java b/src/com/android/launcher2/CustomizePagedView.java
index d08bf54..b997275 100644
--- a/src/com/android/launcher2/CustomizePagedView.java
+++ b/src/com/android/launcher2/CustomizePagedView.java
@@ -38,8 +38,9 @@ import android.content.res.Resources;
import android.content.res.TypedArray;
import android.content.res.XmlResourceParser;
import android.graphics.Bitmap;
-import android.graphics.Bitmap.Config;
import android.graphics.Canvas;
+import android.graphics.Rect;
+import android.graphics.Bitmap.Config;
import android.graphics.drawable.Drawable;
import android.util.AttributeSet;
import android.util.Log;
@@ -53,7 +54,7 @@ import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.animation.DecelerateInterpolator;
-import android.view.animation.Interpolator;
+import android.view.animation.LinearInterpolator;
import android.widget.Checkable;
import android.widget.ImageView;
import android.widget.LinearLayout;
@@ -120,9 +121,19 @@ public class CustomizePagedView extends PagedViewWithDraggableItems
private final float mTmpFloatPos[] = new float[2];
private final float ANIMATION_SCALE = 0.5f;
- private final int ANIMATION_DURATION = 400;
+
+ // The duration of the translation animation that occurs during you drag and drop
+ private final int TRANSLATE_ANIM_DURATION = 400;
+
+ // The duration of the scale & alpha animation that occurs during drag and drop
+ private final int DROP_ANIM_DURATION = 200;
+
private TimeInterpolator mQuintEaseOutInterpolator = new DecelerateInterpolator(2.5f);
- private ScaleAlphaInterpolator mScaleAlphaInterpolator = new ScaleAlphaInterpolator();
+
+ // The Bitmap used to generate the drag view
+ private Bitmap mDragBitmap;
+
+ private int[] mDragViewOrigin = new int[2];
public CustomizePagedView(Context context) {
this(context, null, 0);
@@ -324,38 +335,60 @@ public class CustomizePagedView extends PagedViewWithDraggableItems
return mCustomizationType;
}
- @Override
- public void onDropCompleted(View target, boolean success) {
- resetCheckedGrandchildren();
+ /**
+ * Similar to resetCheckedGrandchildren, but allows us to specify that it's not animated.
+ * NOTE: This assumes that only a single item can be checked.
+ */
+ private void resetCheckedItem(boolean animated) {
+ Checkable checkable = getCheckedGrandchildren().get(0);
+ if (checkable instanceof PagedViewWidget) {
+ ((PagedViewWidget) checkable).setChecked(false, animated);
+ } else {
+ ((PagedViewIcon) checkable).setChecked(false, animated);
+ }
+ }
+
+ public void onDropCompleted(View target, Object dragInfo, boolean success) {
+ final DragLayer dragLayer = (DragLayer) mLauncher.findViewById(R.id.drag_layer);
+
+ // Create a view, identical to the drag view, that is only used for animating the
+ // item onto the home screen (or back to its original position, if the drop failed).
+ final int[] pos = new int[2];
+ mDragController.getDragView().getLocationOnScreen(pos);
+ final View animView = dragLayer.createDragView(mDragBitmap, pos[0], pos[1]);
+ animView.setVisibility(View.VISIBLE);
+
+ if (success) {
+ resetCheckedItem(true);
+ animateDropOntoScreen(animView, (ItemInfo) dragInfo, DROP_ANIM_DURATION, 0);
+ } else {
+ // Animate the icon/widget back to its original position
+ animateIntoPosition(animView, mDragViewOrigin[0], mDragViewOrigin[1], new Runnable() {
+ public void run() {
+ resetCheckedItem(false);
+ dragLayer.removeView(animView);
+ }
+ });
+ }
mLauncher.getWorkspace().onDragStopped(success);
mLauncher.unlockScreenOrientation();
+ mDragBitmap = null;
}
@Override
public void onDragViewVisible() {
}
- class ScaleAlphaInterpolator implements Interpolator {
- public float getInterpolation(float input) {
- float pivot = 0.5f;
- if (input < pivot) {
- return 0;
- } else {
- return (input - pivot)/(1 - pivot);
- }
- }
- }
-
+ /**
+ * Animates the given item onto the center of a home screen, and then scales the item to
+ * look as though it's disappearing onto that screen.
+ */
private void animateItemOntoScreen(View dragView,
final CellLayout layout, final ItemInfo info) {
mTmpFloatPos[0] = layout.getWidth() / 2;
mTmpFloatPos[1] = layout.getHeight() / 2;
mLauncher.getWorkspace().mapPointFromChildToSelf(layout, mTmpFloatPos);
- final DragLayer dragLayer = (DragLayer) mLauncher.findViewById(R.id.drag_layer);
- final View dragCopy = dragLayer.createDragView(dragView);
- dragCopy.setAlpha(1.0f);
-
int dragViewWidth = dragView.getMeasuredWidth();
int dragViewHeight = dragView.getMeasuredHeight();
float heightOffset = 0;
@@ -374,37 +407,69 @@ public class CustomizePagedView extends PagedViewWithDraggableItems
widthOffset = ANIMATION_SCALE * (dragViewWidth - f * width) / 2;
}
}
+ final float toX = mTmpFloatPos[0] - dragView.getMeasuredWidth() / 2 + widthOffset;
+ final float toY = mTmpFloatPos[1] - dragView.getMeasuredHeight() / 2 + heightOffset;
- float toX = mTmpFloatPos[0] - dragView.getMeasuredWidth() / 2 + widthOffset;
- float toY = mTmpFloatPos[1] - dragView.getMeasuredHeight() / 2 + heightOffset;
+ final DragLayer dragLayer = (DragLayer) mLauncher.findViewById(R.id.drag_layer);
+ final View dragCopy = dragLayer.createDragView(dragView);
+ dragCopy.setAlpha(1.0f);
- ObjectAnimator posAnim = ObjectAnimator.ofPropertyValuesHolder(dragCopy,
- PropertyValuesHolder.ofFloat("x", toX),
- PropertyValuesHolder.ofFloat("y", toY));
- posAnim.setInterpolator(mQuintEaseOutInterpolator);
- posAnim.setDuration(ANIMATION_DURATION);
+ // Translate the item to the center of the appropriate home screen
+ animateIntoPosition(dragCopy, toX, toY, null);
- posAnim.addListener(new AnimatorListenerAdapter() {
- public void onAnimationEnd(Animator animation) {
- dragLayer.removeView(dragCopy);
- mLauncher.addExternalItemToScreen(info, layout);
- post(new Runnable() {
- public void run() {
- layout.animateDrop();
- }
- });
- }
- });
+ // The drop-onto-screen animation begins a bit later, but ends at the same time.
+ final int startDelay = TRANSLATE_ANIM_DURATION - DROP_ANIM_DURATION;
+
+ // Scale down the icon and fade out the alpha
+ animateDropOntoScreen(dragCopy, info, DROP_ANIM_DURATION, startDelay);
+ }
+
+ /**
+ * Animation which scales the view down and animates its alpha, making it appear to disappear
+ * onto a home screen.
+ */
+ private void animateDropOntoScreen(
+ final View view, final ItemInfo info, int duration, int delay) {
+ final DragLayer dragLayer = (DragLayer) mLauncher.findViewById(R.id.drag_layer);
+ final CellLayout layout = mLauncher.getWorkspace().getCurrentDropLayout();
- ObjectAnimator scaleAlphaAnim = ObjectAnimator.ofPropertyValuesHolder(dragCopy,
+ ObjectAnimator anim = ObjectAnimator.ofPropertyValuesHolder(view,
PropertyValuesHolder.ofFloat("alpha", 1.0f, 0.0f),
PropertyValuesHolder.ofFloat("scaleX", ANIMATION_SCALE),
PropertyValuesHolder.ofFloat("scaleY", ANIMATION_SCALE));
- scaleAlphaAnim.setInterpolator(mScaleAlphaInterpolator);
- scaleAlphaAnim.setDuration(ANIMATION_DURATION);
+ anim.setInterpolator(new LinearInterpolator());
+ if (delay > 0) {
+ anim.setStartDelay(delay);
+ }
+ anim.setDuration(duration);
+ anim.addListener(new AnimatorListenerAdapter() {
+ public void onAnimationEnd(Animator animation) {
+ dragLayer.removeView(view);
+ mLauncher.addExternalItemToScreen(info, layout);
+ }
+ });
+ anim.start();
+ }
- posAnim.start();
- scaleAlphaAnim.start();
+ /**
+ * Animates the x,y position of the view, and optionally execute a Runnable on animation end.
+ */
+ private void animateIntoPosition(
+ View view, float toX, float toY, final Runnable endRunnable) {
+ ObjectAnimator anim = ObjectAnimator.ofPropertyValuesHolder(view,
+ PropertyValuesHolder.ofFloat("x", toX),
+ PropertyValuesHolder.ofFloat("y", toY));
+ anim.setInterpolator(mQuintEaseOutInterpolator);
+ anim.setDuration(TRANSLATE_ANIM_DURATION);
+ if (endRunnable != null) {
+ anim.addListener(new AnimatorListenerAdapter() {
+ @Override
+ public void onAnimationEnd(Animator animation) {
+ endRunnable.run();
+ }
+ });
+ }
+ anim.start();
}
@Override
@@ -479,12 +544,12 @@ public class CustomizePagedView extends PagedViewWithDraggableItems
}
}
- Bitmap drawableToBitmap(Drawable d, View v, boolean clipHeight) {
- int height = clipHeight ? v.getPaddingTop() + d.getIntrinsicHeight() : v.getHeight();
- Bitmap b = Bitmap.createBitmap(v.getWidth(), height, Bitmap.Config.ARGB_8888);
- Canvas c = new Canvas(b);
- c.translate((v.getWidth() - d.getIntrinsicWidth()) / 2, v.getPaddingTop());
- d.draw(c);
+ private Bitmap drawableToBitmap(Drawable d) {
+ final Rect bounds = d.getBounds();
+ final int w = bounds.width();
+ final int h = bounds.height();
+ Bitmap b = Bitmap.createBitmap(w, h, Bitmap.Config.ARGB_8888);
+ renderDrawableToBitmap(d, b, 0, 0, w, h);
return b;
}
@@ -501,6 +566,7 @@ public class CustomizePagedView extends PagedViewWithDraggableItems
if (isChoiceMode(CHOICE_MODE_SINGLE)) {
endChoiceMode();
}
+ final Workspace workspace = mLauncher.getWorkspace();
boolean result = false;
mLauncher.lockScreenOrientation();
switch (mCustomizationType) {
@@ -509,50 +575,44 @@ public class CustomizePagedView extends PagedViewWithDraggableItems
// Get the widget preview as the drag representation
final LinearLayout l = (LinearLayout) v;
final ImageView i = (ImageView) l.findViewById(R.id.widget_preview);
- Bitmap b = drawableToBitmap(i.getDrawable(), i, true);
+ mDragBitmap = drawableToBitmap(i.getDrawable());
+ i.getLocationOnScreen(mDragViewOrigin);
PendingAddWidgetInfo createWidgetInfo = (PendingAddWidgetInfo) v.getTag();
- int[] spanXY = CellLayout.rectToCell(
- getResources(), createWidgetInfo.minWidth, createWidgetInfo.minHeight, null);
+ int[] spanXY = CellLayout.rectToCell(getResources(),
+ createWidgetInfo.minWidth, createWidgetInfo.minHeight, null);
createWidgetInfo.spanX = spanXY[0];
createWidgetInfo.spanY = spanXY[1];
- mLauncher.getWorkspace().onDragStartedWithItemSpans(spanXY[0], spanXY[1], b);
- mDragController.startDrag(
- i, b, this, createWidgetInfo, DragController.DRAG_ACTION_COPY, null);
- b.recycle();
- result = true;
- }
- break;
- }
- case ShortcutCustomization: {
- if (v instanceof PagedViewIcon) {
- // get icon (top compound drawable, index is 1)
- final TextView tv = (TextView) v;
- final Drawable icon = tv.getCompoundDrawables()[1];
- Bitmap b = drawableToBitmap(icon, tv, false);
- PendingAddItemInfo createItemInfo = (PendingAddItemInfo) v.getTag();
-
- mLauncher.getWorkspace().onDragStartedWithItemSpans(1, 1, b);
- mDragController.startDrag(v, b, this, createItemInfo, DragController.DRAG_ACTION_COPY,
- null);
- b.recycle();
+ workspace.onDragStartedWithItemSpans(spanXY[0], spanXY[1], mDragBitmap);
+ mDragController.startDrag(i, mDragBitmap, this, createWidgetInfo,
+ DragController.DRAG_ACTION_COPY, null);
result = true;
}
break;
}
+ case ShortcutCustomization:
case ApplicationCustomization: {
if (v instanceof PagedViewIcon) {
- // Pick up the application for dropping
// get icon (top compound drawable, index is 1)
final TextView tv = (TextView) v;
final Drawable icon = tv.getCompoundDrawables()[1];
- Bitmap b = drawableToBitmap(icon, tv, false);
- ApplicationInfo app = (ApplicationInfo) v.getTag();
- app = new ApplicationInfo(app);
+ mDragBitmap = drawableToBitmap(icon);
+
+ Object dragInfo = v.getTag();
+ if (mCustomizationType == CustomizationType.ApplicationCustomization) {
+ // TODO: Not sure why we have to copy this
+ dragInfo = new ApplicationInfo((ApplicationInfo) dragInfo);
+ }
+ workspace.onDragStartedWithItemSpans(1, 1, mDragBitmap);
+
+ // Calculate where to place the drag view in order to align the icon pixels with
+ // the original view.
+ v.getLocationOnScreen(mDragViewOrigin);
+ mDragViewOrigin[0] += (v.getWidth() - icon.getIntrinsicWidth()) / 2;
+ mDragViewOrigin[1] += v.getPaddingTop();
- mLauncher.getWorkspace().onDragStartedWithItemSpans(1, 1, b);
- mDragController.startDrag(v, b, this, app, DragController.DRAG_ACTION_COPY, null);
- b.recycle();
+ mDragController.startDrag(mDragBitmap, mDragViewOrigin[0], mDragViewOrigin[1],
+ this, dragInfo, DragController.DRAG_ACTION_COPY);
result = true;
}
break;
@@ -622,8 +682,10 @@ public class CustomizePagedView extends PagedViewWithDraggableItems
private void renderDrawableToBitmap(Drawable d, Bitmap bitmap, int x, int y, int w, int h) {
if (bitmap != null) mCanvas.setBitmap(bitmap);
mCanvas.save();
- d.setBounds(x, y, x+w, y+h);
+ final Rect oldBounds = d.copyBounds();
+ d.setBounds(x, y, x + w, y + h);
d.draw(mCanvas);
+ d.setBounds(oldBounds); // Restore the bounds
mCanvas.restore();
}
diff --git a/src/com/android/launcher2/DragController.java b/src/com/android/launcher2/DragController.java
index 45b359d..e546697 100644
--- a/src/com/android/launcher2/DragController.java
+++ b/src/com/android/launcher2/DragController.java
@@ -205,9 +205,7 @@ public class DragController {
int screenX = loc[0];
int screenY = loc[1];
- startDrag(b, screenX, screenY, 0, 0, b.getWidth(), b.getHeight(),
- source, dragInfo, dragAction, dragRegion);
-
+ startDrag(b, screenX, screenY, source, dragInfo, dragAction, dragRegion);
b.recycle();
if (dragAction == DRAG_ACTION_MOVE) {
@@ -236,8 +234,7 @@ public class DragController {
int screenX = loc[0];
int screenY = loc[1];
- startDrag(bmp, screenX, screenY, 0, 0, bmp.getWidth(), bmp.getHeight(),
- source, dragInfo, dragAction, dragRegion);
+ startDrag(bmp, screenX, screenY, source, dragInfo, dragAction, dragRegion);
if (dragAction == DRAG_ACTION_MOVE) {
v.setVisibility(View.GONE);
@@ -251,20 +248,14 @@ public class DragController {
* enlarged size.
* @param screenX The x position on screen of the left-top of the bitmap.
* @param screenY The y position on screen of the left-top of the bitmap.
- * @param textureLeft The left edge of the region inside b to use.
- * @param textureTop The top edge of the region inside b to use.
- * @param textureWidth The width of the region inside b to use.
- * @param textureHeight The height of the region inside b to use.
* @param source An object representing where the drag originated
* @param dragInfo The data associated with the object that is being dragged
* @param dragAction The drag action: either {@link #DRAG_ACTION_MOVE} or
* {@link #DRAG_ACTION_COPY}
*/
public void startDrag(Bitmap b, int screenX, int screenY,
- int textureLeft, int textureTop, int textureWidth, int textureHeight,
DragSource source, Object dragInfo, int dragAction) {
- startDrag(b, screenX, screenY, textureLeft, textureTop, textureWidth, textureHeight,
- source, dragInfo, dragAction, null);
+ startDrag(b, screenX, screenY, source, dragInfo, dragAction, null);
}
/**
@@ -274,10 +265,6 @@ public class DragController {
* enlarged size.
* @param screenX The x position on screen of the left-top of the bitmap.
* @param screenY The y position on screen of the left-top of the bitmap.
- * @param textureLeft The left edge of the region inside b to use.
- * @param textureTop The top edge of the region inside b to use.
- * @param textureWidth The width of the region inside b to use.
- * @param textureHeight The height of the region inside b to use.
* @param source An object representing where the drag originated
* @param dragInfo The data associated with the object that is being dragged
* @param dragAction The drag action: either {@link #DRAG_ACTION_MOVE} or
@@ -286,7 +273,6 @@ public class DragController {
* Makes dragging feel more precise, e.g. you can clip out a transparent border
*/
public void startDrag(Bitmap b, int screenX, int screenY,
- int textureLeft, int textureTop, int textureWidth, int textureHeight,
DragSource source, Object dragInfo, int dragAction, Rect dragRegion) {
if (PROFILE_DRAWING_DURING_DRAG) {
android.os.Debug.startMethodTracing("Launcher");
@@ -318,7 +304,7 @@ public class DragController {
mVibrator.vibrate(VIBRATE_DURATION);
DragView dragView = mDragView = new DragView(mContext, b, registrationX, registrationY,
- textureLeft, textureTop, textureWidth, textureHeight);
+ 0, 0, b.getWidth(), b.getHeight());
final DragSource dragSource = source;
dragView.setOnDrawRunnable(new Runnable() {
@@ -400,7 +386,7 @@ public class DragController {
public void cancelDrag() {
if (mDragging) {
// Should we also be calling onDragExit() here?
- mDragSource.onDropCompleted(null, false);
+ mDragSource.onDropCompleted(null, mDragInfo, false);
}
endDrag();
}
@@ -596,14 +582,14 @@ public class DragController {
(int) mTouchOffsetX, (int) mTouchOffsetY, mDragView, mDragInfo)) {
dropTarget.onDrop(mDragSource, coordinates[0], coordinates[1],
(int) mTouchOffsetX, (int) mTouchOffsetY, mDragView, mDragInfo);
- mDragSource.onDropCompleted((View) dropTarget, true);
+ mDragSource.onDropCompleted((View) dropTarget, mDragInfo, true);
return true;
} else {
- mDragSource.onDropCompleted((View) dropTarget, false);
+ mDragSource.onDropCompleted((View) dropTarget, mDragInfo, false);
return true;
}
} else {
- mDragSource.onDropCompleted(null, false);
+ mDragSource.onDropCompleted(null, mDragInfo, false);
}
return false;
}
@@ -716,6 +702,10 @@ public class DragController {
mDeleteRegion = region;
}
+ DragView getDragView() {
+ return mDragView;
+ }
+
private class ScrollRunnable implements Runnable {
private int mDirection;
diff --git a/src/com/android/launcher2/DragSource.java b/src/com/android/launcher2/DragSource.java
index 11cdcc9..4dbdaf7 100644
--- a/src/com/android/launcher2/DragSource.java
+++ b/src/com/android/launcher2/DragSource.java
@@ -31,5 +31,5 @@ public interface DragSource {
*/
void onDragViewVisible();
- void onDropCompleted(View target, boolean success);
+ void onDropCompleted(View target, Object dragInfo, boolean success);
}
diff --git a/src/com/android/launcher2/Folder.java b/src/com/android/launcher2/Folder.java
index cb450b9..059e73d 100644
--- a/src/com/android/launcher2/Folder.java
+++ b/src/com/android/launcher2/Folder.java
@@ -114,7 +114,7 @@ public class Folder extends LinearLayout implements DragSource, OnItemLongClickL
}
@Override
- public void onDropCompleted(View target, boolean success) {
+ public void onDropCompleted(View target, Object dragInfo, boolean success) {
}
@Override
diff --git a/src/com/android/launcher2/Launcher.java b/src/com/android/launcher2/Launcher.java
index df6ff36..a80833e 100644
--- a/src/com/android/launcher2/Launcher.java
+++ b/src/com/android/launcher2/Launcher.java
@@ -88,6 +88,7 @@ import android.view.Surface;
import android.view.View;
import android.view.ViewGroup;
import android.view.WindowManager;
+import android.view.View.OnClickListener;
import android.view.View.OnLongClickListener;
import android.view.accessibility.AccessibilityEvent;
import android.view.animation.DecelerateInterpolator;
@@ -181,7 +182,7 @@ public final class Launcher extends Activity
private static final String TOOLBAR_ICON_METADATA_NAME = "com.android.launcher.toolbar_icon";
/** The different states that Launcher can be in. */
- private enum State { WORKSPACE, ALL_APPS, CUSTOMIZE, OVERVIEW,
+ private enum State { WORKSPACE, ALL_APPS, CUSTOMIZE,
CUSTOMIZE_SPRING_LOADED, ALL_APPS_SPRING_LOADED };
private State mState = State.WORKSPACE;
private AnimatorSet mStateAnimation;
@@ -217,6 +218,11 @@ public final class Launcher extends Activity
private TabHost mHomeCustomizationDrawer;
private boolean mAutoAdvanceRunning = false;
+ private View mButtonCluster;
+ private View mAllAppsButton;
+ private View mDivider;
+ private View mConfigureButton;
+
private AllAppsPagedView mAllAppsPagedView = null;
private CustomizePagedView mCustomizePagedView = null;
@@ -274,6 +280,8 @@ public final class Launcher extends Activity
private static Drawable.ConstantState sVoiceSearchIcon;
private static Drawable.ConstantState sAppMarketIcon;
+ private BubbleTextView mWaitingForResume;
+
private CustomizationType getCustomizeFilterForTabTag(String tag) {
if (tag.equals(WIDGETS_TAG)) {
return CustomizationType.WidgetCustomization;
@@ -755,6 +763,9 @@ public final class Launcher extends Activity
mRestoring = false;
mOnResumeNeedsLoad = false;
}
+ if (mWaitingForResume != null) {
+ mWaitingForResume.setStayPressed(false);
+ }
// When we resume Launcher, a different Activity might be responsible for the app
// market intent, so refresh the icon
updateAppMarketIcon();
@@ -1043,6 +1054,36 @@ public final class Launcher extends Activity
if (allAppsDeleteZone != null) {
dragController.addDropTarget(allAppsDeleteZone);
}
+ mButtonCluster = findViewById(R.id.all_apps_button_cluster);
+
+ mAllAppsButton = findViewById(R.id.all_apps_button);
+ mDivider = findViewById(R.id.divider);
+ mConfigureButton = findViewById(R.id.configure_button);
+
+ // We had previously set these click handlers in XML, but the first time we launched
+ // Configure or All Apps we had an extra 50ms of delay while the java reflection methods
+ // found the right handler. Setting the handlers directly here eliminates that cost.
+ if (mConfigureButton != null) {
+ mConfigureButton.setOnClickListener(new OnClickListener() {
+ public void onClick(View v) {
+ onClickConfigureButton(v);
+ }
+ });
+ }
+ if (mDivider != null) {
+ mDivider.setOnClickListener(new OnClickListener() {
+ public void onClick(View v) {
+ onClickAllAppsButton(v);
+ }
+ });
+ }
+ if (mAllAppsButton != null) {
+ mAllAppsButton.setOnClickListener(new OnClickListener() {
+ public void onClick(View v) {
+ onClickAllAppsButton(v);
+ }
+ });
+ }
}
@SuppressWarnings({"UnusedDeclaration"})
@@ -1971,7 +2012,9 @@ public final class Launcher extends Activity
* Re-listen when widgets are reset.
*/
private void onAppWidgetReset() {
- mAppWidgetHost.startListening();
+ if (mAppWidgetHost != null) {
+ mAppWidgetHost.startListening();
+ }
}
/**
@@ -1999,7 +2042,12 @@ public final class Launcher extends Activity
v.getLocationOnScreen(pos);
intent.setSourceBounds(new Rect(pos[0], pos[1],
pos[0] + v.getWidth(), pos[1] + v.getHeight()));
- startActivitySafely(intent, tag);
+ boolean success = startActivitySafely(intent, tag);
+
+ if (success && v instanceof BubbleTextView) {
+ mWaitingForResume = (BubbleTextView) v;
+ mWaitingForResume.setStayPressed(true);
+ }
} else if (tag instanceof FolderInfo) {
handleFolderClick((FolderInfo) tag);
} else if (v == mHandleView) {
@@ -2092,10 +2140,11 @@ public final class Launcher extends Activity
}
}
- void startActivitySafely(Intent intent, Object tag) {
+ boolean startActivitySafely(Intent intent, Object tag) {
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
try {
startActivity(intent);
+ return true;
} catch (ActivityNotFoundException e) {
Toast.makeText(this, R.string.activity_not_found, Toast.LENGTH_SHORT).show();
Log.e(TAG, "Unable to launch. tag=" + tag + " intent=" + intent, e);
@@ -2106,6 +2155,7 @@ public final class Launcher extends Activity
"or use the exported attribute for this activity. "
+ "tag="+ tag + " intent=" + intent, e);
}
+ return false;
}
void startActivityForResultSafely(Intent intent, int requestCode) {
@@ -2536,7 +2586,7 @@ public final class Launcher extends Activity
}
}
- private void showToolbarButton(View button) {
+ private void showAndEnableToolbarButton(View button) {
button.setVisibility(View.VISIBLE);
button.setFocusable(true);
button.setClickable(true);
@@ -2546,6 +2596,9 @@ public final class Launcher extends Activity
button.setAlpha(0.0f);
// We can't set it to GONE, otherwise the RelativeLayout gets screwed up
button.setVisibility(View.INVISIBLE);
+ }
+
+ private void disableToolbarButton(View button) {
button.setFocusable(false);
button.setClickable(false);
}
@@ -2567,12 +2620,18 @@ public final class Launcher extends Activity
getResources().getInteger(R.integer.config_toolbarButtonFadeOutTime);
if (seq != null) {
- Animator anim = ObjectAnimator.ofFloat(view, "alpha", show ? 1.0f : 0.0f);
+ ValueAnimator anim = ValueAnimator.ofFloat(view.getAlpha(), show ? 1.0f : 0.0f);
anim.setDuration(duration);
+ anim.addUpdateListener(new AnimatorUpdateListener() {
+ public void onAnimationUpdate(ValueAnimator animation) {
+ view.setAlpha((Float) animation.getAnimatedValue());
+ }
+ });
anim.addListener(new AnimatorListenerAdapter() {
@Override
public void onAnimationStart(Animator animation) {
- if (showing) showToolbarButton(view);
+ if (showing) showAndEnableToolbarButton(view);
+ if (hiding) disableToolbarButton(view);
}
@Override
public void onAnimationEnd(Animator animation) {
@@ -2582,9 +2641,10 @@ public final class Launcher extends Activity
seq.play(anim);
} else {
if (showing) {
- showToolbarButton(view);
+ showAndEnableToolbarButton(view);
view.setAlpha(1f);
} else {
+ disableToolbarButton(view);
hideToolbarButton(view);
}
}
@@ -2599,26 +2659,21 @@ public final class Launcher extends Activity
* @param hideSeq AnimatorSet in which to put "hide" animations, or null.
*/
private void hideAndShowToolbarButtons(State newState, AnimatorSet showSeq, AnimatorSet hideSeq) {
- final View buttonCluster = findViewById(R.id.all_apps_button_cluster);
-
- final View allAppsButton = findViewById(R.id.all_apps_button);
- final View divider = findViewById(R.id.divider);
- final View configureButton = findViewById(R.id.configure_button);
-
switch (newState) {
case WORKSPACE:
- hideOrShowToolbarButton(true, buttonCluster, showSeq);
- mDeleteZone.setOverlappingViews(new View[] { allAppsButton, divider, configureButton });
+ hideOrShowToolbarButton(true, mButtonCluster, showSeq);
+ mDeleteZone.setOverlappingViews(
+ new View[] { mAllAppsButton, mDivider, mConfigureButton });
mDeleteZone.setDragAndDropEnabled(true);
mDeleteZone.setText(getResources().getString(R.string.delete_zone_label_workspace));
break;
case ALL_APPS:
- hideOrShowToolbarButton(false, buttonCluster, hideSeq);
+ hideOrShowToolbarButton(false, mButtonCluster, hideSeq);
mDeleteZone.setDragAndDropEnabled(false);
mDeleteZone.setText(getResources().getString(R.string.delete_zone_label_all_apps));
break;
case CUSTOMIZE:
- hideOrShowToolbarButton(false, buttonCluster, hideSeq);
+ hideOrShowToolbarButton(false, mButtonCluster, hideSeq);
mDeleteZone.setDragAndDropEnabled(false);
break;
}
@@ -2847,94 +2902,13 @@ public final class Launcher extends Activity
}
}
- /**
- * Pan the camera in the vertical plane between 'fromView' and 'toView'.
- * This is the transition used on xlarge screens to go between all apps and
- * the home customization drawer.
- * @param fromState The view to pan away from. Must be ALL_APPS or CUSTOMIZE.
- * @param toState The view to pan into the frame. Must be ALL_APPS or CUSTOMIZE.
- * @param animated If true, the transition will be animated.
- */
- private void cameraPan(State fromState, State toState, boolean animated) {
- final Resources res = getResources();
- final int duration = res.getInteger(R.integer.config_allAppsCameraPanTime);
- final int workspaceHeight = mWorkspace.getHeight();
-
- final boolean fromAllApps = (fromState == State.ALL_APPS);
- final View fromView = fromAllApps ? (View) mAllAppsGrid : mHomeCustomizationDrawer;
- final View toView = fromAllApps ? mHomeCustomizationDrawer : (View) mAllAppsGrid;
-
- final float fromViewStartY = fromAllApps ? 0.0f : fromView.getY();
- final float fromViewEndY = fromAllApps ? -fromView.getHeight() * 2 : workspaceHeight * 2;
- final float toViewStartY = fromAllApps ? workspaceHeight * 2 : -toView.getHeight() * 2;
- final float toViewEndY = fromAllApps ? workspaceHeight - toView.getHeight() : 0.0f;
-
- mCustomizePagedView.endChoiceMode();
- mAllAppsPagedView.endChoiceMode();
-
- if (toState == State.ALL_APPS) {
- mWorkspace.shrink(Workspace.ShrinkState.BOTTOM_HIDDEN, animated);
- } else {
- mWorkspace.shrink(Workspace.ShrinkState.TOP, animated);
- }
-
- if (animated) {
- if (mStateAnimation != null) mStateAnimation.cancel();
- mStateAnimation = new AnimatorSet();
- mStateAnimation.addListener(new AnimatorListenerAdapter() {
- @Override
- public void onAnimationStart(Animator animation) {
- toView.setVisibility(View.VISIBLE);
- toView.setY(toViewStartY);
- toView.setAlpha(1.0f);
- }
- @Override
- public void onAnimationEnd(Animator animation) {
- fromView.setVisibility(View.GONE);
- }
- });
-
- AnimatorSet toolbarHideAnim = new AnimatorSet();
- AnimatorSet toolbarShowAnim = new AnimatorSet();
- hideAndShowToolbarButtons(toState, toolbarShowAnim, toolbarHideAnim);
-
- ObjectAnimator fromAnim = ObjectAnimator.ofFloat(fromView, "y",
- fromViewStartY, fromViewEndY);
- fromAnim.setDuration(duration);
- ObjectAnimator toAnim = ObjectAnimator.ofPropertyValuesHolder(toView,
- PropertyValuesHolder.ofFloat("y", toViewStartY, toViewEndY),
- PropertyValuesHolder.ofFloat("scaleX", toView.getScaleX(), 1.0f),
- PropertyValuesHolder.ofFloat("scaleY", toView.getScaleY(), 1.0f)
- );
- fromAnim.setDuration(duration);
- mStateAnimation.playTogether(toolbarHideAnim, fromAnim, toAnim);
-
- // Show the new toolbar buttons just as the main animation is ending
- final int fadeInTime = res.getInteger(R.integer.config_toolbarButtonFadeInTime);
- mStateAnimation.play(toolbarShowAnim).after(duration - fadeInTime);
- mStateAnimation.start();
- } else {
- fromView.setY(fromViewEndY);
- fromView.setVisibility(View.GONE);
- toView.setY(toViewEndY);
- toView.setScaleX(1.0f);
- toView.setScaleY(1.0f);
- toView.setVisibility(View.VISIBLE);
- hideAndShowToolbarButtons(toState, null, null);
- }
- }
-
void showAllApps(boolean animated) {
- if (mState == State.ALL_APPS) {
+ if (mState != State.WORKSPACE) {
return;
}
if (LauncherApplication.isScreenXLarge()) {
- if (mState == State.CUSTOMIZE) {
- cameraPan(State.CUSTOMIZE, State.ALL_APPS, animated);
- } else {
- cameraZoomOut(State.ALL_APPS, animated);
- }
+ cameraZoomOut(State.ALL_APPS, animated);
} else {
mAllAppsGrid.zoom(1.0f, animated);
}
@@ -3074,11 +3048,12 @@ public final class Launcher extends Activity
// Show the customization drawer (only exists in x-large configuration)
private void showCustomizationDrawer(boolean animated) {
- if (mState == State.ALL_APPS) {
- cameraPan(State.ALL_APPS, State.CUSTOMIZE, animated);
- } else {
- cameraZoomOut(State.CUSTOMIZE, animated);
+ if (mState != State.WORKSPACE) {
+ return;
}
+
+ cameraZoomOut(State.CUSTOMIZE, animated);
+
// Change the state *after* we've called all the transition code
mState = State.CUSTOMIZE;
@@ -3094,9 +3069,15 @@ public final class Launcher extends Activity
}
}
- void addExternalItemToScreen(ItemInfo itemInfo, CellLayout layout) {
+ /**
+ * Add an item from all apps or customize onto the given workspace screen.
+ * If layout is null, add to the current screen.
+ */
+ void addExternalItemToScreen(ItemInfo itemInfo, final CellLayout layout) {
if (!mWorkspace.addExternalItemToScreen(itemInfo, layout)) {
showOutOfSpaceMessage();
+ } else {
+ layout.animateDrop();
}
}
diff --git a/src/com/android/launcher2/LauncherModel.java b/src/com/android/launcher2/LauncherModel.java
index 0052737..2364174 100644
--- a/src/com/android/launcher2/LauncherModel.java
+++ b/src/com/android/launcher2/LauncherModel.java
@@ -44,6 +44,7 @@ import android.database.Cursor;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.net.Uri;
+import android.os.Environment;
import android.os.Handler;
import android.os.HandlerThread;
import android.os.Parcelable;
@@ -65,6 +66,7 @@ public class LauncherModel extends BroadcastReceiver {
static final String TAG = "Launcher.Model";
private static final int ITEMS_CHUNK = 6; // batch size for the workspace icons
+ private final boolean mAppsCanBeOnExternalStorage;
private int mBatchSize; // 0 is all apps at once
private int mAllAppsLoadDelay; // milliseconds between batches
@@ -115,6 +117,7 @@ public class LauncherModel extends BroadcastReceiver {
}
LauncherModel(LauncherApplication app, IconCache iconCache) {
+ mAppsCanBeOnExternalStorage = !Environment.isExternalStorageEmulated();
mApp = app;
mAllAppsList = new AllAppsList(iconCache);
mIconCache = iconCache;
@@ -794,8 +797,6 @@ public class LauncherModel extends BroadcastReceiver {
}
if (info != null) {
- updateSavedIcon(context, info, c, iconIndex);
-
info.intent = intent;
info.id = c.getLong(idIndex);
container = c.getInt(containerIndex);
@@ -820,6 +821,10 @@ public class LauncherModel extends BroadcastReceiver {
folderInfo.add(info);
break;
}
+
+ // now that we've loaded everthing re-save it with the
+ // icon in case it disappears somehow.
+ updateSavedIcon(context, info, c, iconIndex);
} else {
// Failed to load the shortcut, probably because the
// activity manager couldn't resolve it (maybe the app
@@ -1669,6 +1674,10 @@ public class LauncherModel extends BroadcastReceiver {
}
void updateSavedIcon(Context context, ShortcutInfo info, Cursor c, int iconIndex) {
+ // If apps can't be on SD, don't even bother.
+ if (!mAppsCanBeOnExternalStorage) {
+ return;
+ }
// If this icon doesn't have a custom icon, check to see
// what's stored in the DB, and if it doesn't match what
// we're going to show, store what we are going to show back
@@ -1691,9 +1700,8 @@ public class LauncherModel extends BroadcastReceiver {
}
if (needSave) {
Log.d(TAG, "going to save icon bitmap for info=" + info);
- // This is slower than is ideal, but this only happens either
- // after the froyo OTA or when the app is updated with a new
- // icon.
+ // This is slower than is ideal, but this only happens once
+ // or when the app is updated with a new icon.
updateItemInDatabase(context, info);
}
}
diff --git a/src/com/android/launcher2/PagedView.java b/src/com/android/launcher2/PagedView.java
index e4cdd59..cb95235 100644
--- a/src/com/android/launcher2/PagedView.java
+++ b/src/com/android/launcher2/PagedView.java
@@ -61,6 +61,7 @@ public abstract class PagedView extends ViewGroup {
private static final float OVERSCROLL_DAMP_FACTOR = 0.08f;
private static final int MINIMUM_SNAP_VELOCITY = 2200;
private static final int MIN_FLING_VELOCITY = 250;
+ private static final float RETURN_TO_ORIGINAL_PAGE_THRESHOLD = 0.33f;
// the velocity at which a fling gesture will cause us to snap to the next page
protected int mSnapVelocity = 500;
@@ -81,6 +82,7 @@ public abstract class PagedView extends ViewGroup {
protected float mLastMotionX;
protected float mLastMotionXRemainder;
protected float mLastMotionY;
+ protected float mTotalMotionX;
private int mLastScreenCenter = -1;
protected final static int TOUCH_STATE_REST = 0;
@@ -596,21 +598,7 @@ public abstract class PagedView extends ViewGroup {
canvas.clipRect(mScrollX, mScrollY, mScrollX + mRight - mLeft,
mScrollY + mBottom - mTop);
- for (int i = 0; i < pageCount; i++) {
- View child = getChildAt(i);
- if (child != null && child instanceof PagedViewCellLayout) {
- boolean willBeDrawn = i >= leftScreen && i <= rightScreen;
- if (!willBeDrawn) {
- ((PagedViewCellLayout)child).destroyHardwareLayers();
- }
- }
- }
-
for (int i = leftScreen; i <= rightScreen; i++) {
- View child = getChildAt(i);
- if (child != null && child instanceof PagedViewCellLayout) {
- ((PagedViewCellLayout)child).createHardwareLayers();
- }
drawChild(canvas, getChildAt(i), drawingTime);
}
canvas.restore();
@@ -777,6 +765,7 @@ public abstract class PagedView extends ViewGroup {
mLastMotionX = x;
mLastMotionY = y;
mLastMotionXRemainder = 0;
+ mTotalMotionX = 0;
mActivePointerId = ev.getPointerId(0);
mAllowLongPress = true;
@@ -952,6 +941,7 @@ public abstract class PagedView extends ViewGroup {
// Remember where the motion event started
mDownMotionX = mLastMotionX = ev.getX();
mLastMotionXRemainder = 0;
+ mTotalMotionX = 0;
mActivePointerId = ev.getPointerId(0);
if (mTouchState == TOUCH_STATE_SCROLLING) {
pageBeginMoving();
@@ -965,6 +955,8 @@ public abstract class PagedView extends ViewGroup {
final float x = ev.getX(pointerIndex);
final float deltaX = mLastMotionX + mLastMotionXRemainder - x;
+ mTotalMotionX += Math.abs(deltaX);
+
// Only scroll and update mLastMotionX if we have moved some discrete amount. We
// keep the remainder because we are actually testing if we've moved from the last
// scrolled position (which is discrete).
@@ -995,17 +987,37 @@ public abstract class PagedView extends ViewGroup {
velocityTracker.computeCurrentVelocity(1000, mMaximumVelocity);
int velocityX = (int) velocityTracker.getXVelocity(activePointerId);
final int deltaX = (int) (x - mDownMotionX);
- boolean isfling = Math.abs(deltaX) > MIN_LENGTH_FOR_FLING;
boolean isSignificantMove = Math.abs(deltaX) > MIN_LENGTH_FOR_MOVE;
-
final int snapVelocity = mSnapVelocity;
- if ((isSignificantMove && deltaX > 0 ||
- (isfling && velocityX > snapVelocity)) && mCurrentPage > 0) {
- snapToPageWithVelocity(mCurrentPage - 1, velocityX);
- } else if ((isSignificantMove && deltaX < 0 ||
- (isfling && velocityX < -snapVelocity)) &&
+
+ mTotalMotionX += Math.abs(mLastMotionX + mLastMotionXRemainder - x);
+
+ // In the case that the page is moved far to one direction and then is flung
+ // in the opposite direction, we use a threshold to determine whether we should
+ // just return to the starting page, or if we should skip one further.
+ boolean returnToOriginalPage = false;
+ final int pageWidth = getScaledMeasuredWidth(getChildAt(mCurrentPage));
+ if (Math.abs(deltaX) > pageWidth * RETURN_TO_ORIGINAL_PAGE_THRESHOLD &&
+ Math.signum(velocityX) != Math.signum(deltaX)) {
+ returnToOriginalPage = true;
+ }
+
+ boolean isFling = mTotalMotionX > MIN_LENGTH_FOR_FLING &&
+ Math.abs(velocityX) > snapVelocity;
+
+ int finalPage;
+ // We give flings precedence over large moves, which is why we short-circuit our
+ // test for a large move if a fling has been registered. That is, a large
+ // move to the left and fling to the right will register as a fling to the right.
+ if (((isSignificantMove && deltaX > 0 && !isFling) ||
+ (isFling && velocityX > 0)) && mCurrentPage > 0) {
+ finalPage = returnToOriginalPage ? mCurrentPage : mCurrentPage - 1;
+ snapToPageWithVelocity(finalPage, velocityX);
+ } else if (((isSignificantMove && deltaX < 0 && !isFling) ||
+ (isFling && velocityX < 0)) &&
mCurrentPage < getChildCount() - 1) {
- snapToPageWithVelocity(mCurrentPage + 1, velocityX);
+ finalPage = returnToOriginalPage ? mCurrentPage : mCurrentPage + 1;
+ snapToPageWithVelocity(finalPage, velocityX);
} else {
snapToDestination();
}
diff --git a/src/com/android/launcher2/PagedViewCellLayout.java b/src/com/android/launcher2/PagedViewCellLayout.java
index d64f3c9..57d41fa 100644
--- a/src/com/android/launcher2/PagedViewCellLayout.java
+++ b/src/com/android/launcher2/PagedViewCellLayout.java
@@ -141,6 +141,7 @@ public class PagedViewCellLayout extends ViewGroup implements Page {
public void removeAllViewsOnPage() {
mChildren.removeAllViews();
mHolographicChildren.removeAllViews();
+ destroyHardwareLayers();
}
@Override
diff --git a/src/com/android/launcher2/PagedViewIcon.java b/src/com/android/launcher2/PagedViewIcon.java
index 1366619..9c5d126 100644
--- a/src/com/android/launcher2/PagedViewIcon.java
+++ b/src/com/android/launcher2/PagedViewIcon.java
@@ -243,8 +243,7 @@ public class PagedViewIcon extends CachedTextView implements Checkable {
return mIsChecked;
}
- @Override
- public void setChecked(boolean checked) {
+ void setChecked(boolean checked, boolean animate) {
if (mIsChecked != checked) {
mIsChecked = checked;
@@ -262,15 +261,24 @@ public class PagedViewIcon extends CachedTextView implements Checkable {
if (mCheckedAlphaAnimator != null) {
mCheckedAlphaAnimator.cancel();
}
- mCheckedAlphaAnimator = ObjectAnimator.ofFloat(this, "alpha", getAlpha(), alpha);
- mCheckedAlphaAnimator.setDuration(duration);
- mCheckedAlphaAnimator.start();
+ if (animate) {
+ mCheckedAlphaAnimator = ObjectAnimator.ofFloat(this, "alpha", getAlpha(), alpha);
+ mCheckedAlphaAnimator.setDuration(duration);
+ mCheckedAlphaAnimator.start();
+ } else {
+ setAlpha(alpha);
+ }
invalidate();
}
}
@Override
+ public void setChecked(boolean checked) {
+ setChecked(checked, true);
+ }
+
+ @Override
public void toggle() {
setChecked(!mIsChecked);
}
diff --git a/src/com/android/launcher2/PagedViewWidget.java b/src/com/android/launcher2/PagedViewWidget.java
index 9b83f48..07b215d 100644
--- a/src/com/android/launcher2/PagedViewWidget.java
+++ b/src/com/android/launcher2/PagedViewWidget.java
@@ -257,8 +257,7 @@ public class PagedViewWidget extends LinearLayout implements Checkable {
sWorker.removeMessages(MESSAGE_CREATE_HOLOGRAPHIC_OUTLINE, this);
}
- @Override
- public void setChecked(boolean checked) {
+ void setChecked(boolean checked, boolean animate) {
if (mIsChecked != checked) {
mIsChecked = checked;
@@ -276,15 +275,24 @@ public class PagedViewWidget extends LinearLayout implements Checkable {
if (mCheckedAlphaAnimator != null) {
mCheckedAlphaAnimator.cancel();
}
- mCheckedAlphaAnimator = ObjectAnimator.ofFloat(this, "alpha", getAlpha(), alpha);
- mCheckedAlphaAnimator.setDuration(duration);
- mCheckedAlphaAnimator.start();
+ if (animate) {
+ mCheckedAlphaAnimator = ObjectAnimator.ofFloat(this, "alpha", getAlpha(), alpha);
+ mCheckedAlphaAnimator.setDuration(duration);
+ mCheckedAlphaAnimator.start();
+ } else {
+ setAlpha(alpha);
+ }
invalidate();
}
}
@Override
+ public void setChecked(boolean checked) {
+ setChecked(checked, true);
+ }
+
+ @Override
public boolean isChecked() {
return mIsChecked;
}
diff --git a/src/com/android/launcher2/UserFolder.java b/src/com/android/launcher2/UserFolder.java
index b362fbd..251b3f9 100644
--- a/src/com/android/launcher2/UserFolder.java
+++ b/src/com/android/launcher2/UserFolder.java
@@ -64,7 +64,7 @@ public class UserFolder extends Folder implements DropTarget {
}
@Override
- public void onDropCompleted(View target, boolean success) {
+ public void onDropCompleted(View target, Object dragInfo, boolean success) {
if (success) {
ShortcutsAdapter adapter = (ShortcutsAdapter)mContent.getAdapter();
adapter.remove(mDragItem);
diff --git a/src/com/android/launcher2/Workspace.java b/src/com/android/launcher2/Workspace.java
index 0daed37..c2063ab 100644
--- a/src/com/android/launcher2/Workspace.java
+++ b/src/com/android/launcher2/Workspace.java
@@ -108,8 +108,8 @@ public class Workspace extends SmoothPagedView
private float mChildrenOutlineAlpha = 0;
// These properties refer to the background protection gradient used for AllApps and Customize
- private ObjectAnimator mBackgroundFadeInAnimation;
- private ObjectAnimator mBackgroundFadeOutAnimation;
+ private ValueAnimator mBackgroundFadeInAnimation;
+ private ValueAnimator mBackgroundFadeOutAnimation;
private Drawable mBackground;
private Drawable mCustomizeTrayBackground;
private boolean mDrawCustomizeTrayBackground;
@@ -224,9 +224,6 @@ public class Workspace extends SmoothPagedView
final static float MAX_SWIPE_ANGLE = (float) Math.PI / 3;
final static float TOUCH_SLOP_DAMPING_FACTOR = 4;
- int mSpringLoadedDropX;
- int mSpringLoadedDropY;
-
/**
* Used to inflate the Workspace from XML.
*
@@ -938,7 +935,12 @@ public class Workspace extends SmoothPagedView
if (mBackground == null) return;
if (mBackgroundFadeOutAnimation != null) mBackgroundFadeOutAnimation.cancel();
if (mBackgroundFadeInAnimation != null) mBackgroundFadeInAnimation.cancel();
- mBackgroundFadeInAnimation = ObjectAnimator.ofFloat(this, "backgroundAlpha", 1.0f);
+ mBackgroundFadeInAnimation = ValueAnimator.ofFloat(getBackgroundAlpha(), 1f);
+ mBackgroundFadeInAnimation.addUpdateListener(new AnimatorUpdateListener() {
+ public void onAnimationUpdate(ValueAnimator animation) {
+ setBackgroundAlpha(((Float) animation.getAnimatedValue()).floatValue());
+ }
+ });
mBackgroundFadeInAnimation.setInterpolator(new DecelerateInterpolator(1.5f));
mBackgroundFadeInAnimation.setDuration(BACKGROUND_FADE_IN_DURATION);
mBackgroundFadeInAnimation.start();
@@ -948,7 +950,12 @@ public class Workspace extends SmoothPagedView
if (mBackground == null) return;
if (mBackgroundFadeInAnimation != null) mBackgroundFadeInAnimation.cancel();
if (mBackgroundFadeOutAnimation != null) mBackgroundFadeOutAnimation.cancel();
- mBackgroundFadeOutAnimation = ObjectAnimator.ofFloat(this, "backgroundAlpha", 0.0f);
+ mBackgroundFadeOutAnimation = ValueAnimator.ofFloat(getBackgroundAlpha(), 0f);
+ mBackgroundFadeOutAnimation.addUpdateListener(new AnimatorUpdateListener() {
+ public void onAnimationUpdate(ValueAnimator animation) {
+ setBackgroundAlpha(((Float) animation.getAnimatedValue()).floatValue());
+ }
+ });
mBackgroundFadeOutAnimation.setInterpolator(new DecelerateInterpolator(1.5f));
mBackgroundFadeOutAnimation.setDuration(BACKGROUND_FADE_OUT_DURATION);
mBackgroundFadeOutAnimation.start();
@@ -1517,9 +1524,13 @@ public class Workspace extends SmoothPagedView
final float newVerticalWallpaperOffset = wallpaperOffset;
animWithInterpolator.addUpdateListener(new AnimatorUpdateListener() {
public void onAnimationUpdate(ValueAnimator animation) {
- fastInvalidate();
final float b = (Float) animation.getAnimatedValue();
final float a = 1f - b;
+ if (b == 0f) {
+ // an optimization, and required for correct behavior.
+ return;
+ }
+ fastInvalidate();
setHorizontalWallpaperOffset(
a * oldHorizontalWallpaperOffset + b * newHorizontalWallpaperOffset);
setVerticalWallpaperOffset(
@@ -1847,9 +1858,13 @@ public class Workspace extends SmoothPagedView
final float newVerticalWallpaperOffset = 0.5f;
animWithInterpolator.addUpdateListener(new AnimatorUpdateListener() {
public void onAnimationUpdate(ValueAnimator animation) {
- fastInvalidate();
final float b = (Float) animation.getAnimatedValue();
final float a = 1f - b;
+ if (b == 0f) {
+ // an optimization, but not required
+ return;
+ }
+ fastInvalidate();
setHorizontalWallpaperOffset(
a * oldHorizontalWallpaperOffset + b * newHorizontalWallpaperOffset);
setVerticalWallpaperOffset(
@@ -1880,6 +1895,10 @@ public class Workspace extends SmoothPagedView
// don't invalidate workspace because we did it above
final float b = (Float) animation.getAnimatedValue();
final float a = 1f - b;
+ if (b == 0f) {
+ // an optimization, but not required
+ return;
+ }
for (int i = 0; i < screenCount; i++) {
final CellLayout cl = (CellLayout) getChildAt(i);
cl.setFastRotationY(a * oldRotationYs[i] + b * newRotationYs[i]);
@@ -2051,8 +2070,8 @@ public class Workspace extends SmoothPagedView
final int screenX = (int) mTempXY[0] + (child.getWidth() - bmpWidth) / 2;
final int screenY = (int) mTempXY[1] + (child.getHeight() - bmpHeight) / 2;
mLauncher.lockScreenOrientation();
- mDragController.startDrag(b, screenX, screenY, 0, 0, bmpWidth, bmpHeight, this,
- child.getTag(), DragController.DRAG_ACTION_MOVE, null);
+ mDragController.startDrag(
+ b, screenX, screenY, this, child.getTag(), DragController.DRAG_ACTION_MOVE);
b.recycle();
}
@@ -2180,9 +2199,9 @@ public class Workspace extends SmoothPagedView
public void onDrop(DragSource source, int x, int y, int xOffset, int yOffset,
DragView dragView, Object dragInfo) {
-
- int originX = x - xOffset;
- int originY = y - yOffset;
+ boolean largeOrSpringLoaded = !mIsSmall || mWasSpringLoadedOnDragExit;
+ int originX = largeOrSpringLoaded ? x - xOffset : x - xOffset + dragView.getWidth() / 2;
+ int originY = largeOrSpringLoaded ? y - yOffset : y - yOffset + dragView.getHeight() / 2;
if (mIsSmall || mIsInUnshrinkAnimation) {
// get originX and originY in the local coordinate system of the screen
@@ -2191,6 +2210,10 @@ public class Workspace extends SmoothPagedView
mapPointFromSelfToChild(mDragTargetLayout, mTempOriginXY);
originX = (int)mTempOriginXY[0];
originY = (int)mTempOriginXY[1];
+ if (!largeOrSpringLoaded) {
+ originX -= mDragTargetLayout.getCellWidth() / 2;
+ originY -= mDragTargetLayout.getCellHeight() / 2;
+ }
}
// When you are in customization mode and drag to a particular screen, make that the
@@ -2203,13 +2226,12 @@ public class Workspace extends SmoothPagedView
}
if (source != this) {
- if (!mIsSmall || mWasSpringLoadedOnDragExit) {
- onDropExternal(originX, originY, dragInfo, mDragTargetLayout, false);
- } else {
- // if we drag and drop to small screens, don't pass the touch x/y coords (when we
- // enable spring-loaded adding, however, we do want to pass the touch x/y coords)
- onDropExternal(-1, -1, dragInfo, mDragTargetLayout, false);
+ if ((mIsSmall || mIsInUnshrinkAnimation) && !mLauncher.isAllAppsVisible()) {
+ // When the workspace is shrunk and the drop comes from customize, don't actually
+ // add the item to the screen -- customize will do this itself
+ return;
}
+ onDropExternal(new int[] { originX, originY }, dragInfo, mDragTargetLayout, false);
} else if (mDragInfo != null) {
final View cell = mDragInfo.cell;
CellLayout dropTargetLayout = mDragTargetLayout;
@@ -2418,7 +2440,7 @@ public class Workspace extends SmoothPagedView
if (isShortcut) {
final Intent intent = data.getItemAt(index).getIntent();
Object info = model.infoFromShortcutIntent(mContext, intent, data.getIcon());
- onDropExternal(x, y, info, layout, false);
+ onDropExternal(new int[] { x, y }, info, layout, false);
} else {
if (widgets.size() == 1) {
// If there is only one item, then go ahead and add and configure
@@ -2681,8 +2703,6 @@ public class Workspace extends SmoothPagedView
final View child = (mDragInfo == null) ? null : mDragInfo.cell;
float[] localOrigin = { originX, originY };
mapPointFromSelfToChild(mDragTargetLayout, localOrigin, null);
- mSpringLoadedDropX = (int) localOrigin[0];
- mSpringLoadedDropY = (int) localOrigin[1];
mDragTargetLayout.visualizeDropLocation(child, mDragOutline,
(int) localOrigin[0], (int) localOrigin[1], item.spanX, item.spanY);
}
@@ -2723,7 +2743,7 @@ public class Workspace extends SmoothPagedView
*/
public boolean addExternalItemToScreen(ItemInfo dragInfo, CellLayout layout) {
if (layout.findCellForSpan(mTempEstimate, dragInfo.spanX, dragInfo.spanY)) {
- onDropExternal(-1, -1, (ItemInfo) dragInfo, (CellLayout) layout, false);
+ onDropExternal(null, (ItemInfo) dragInfo, (CellLayout) layout, false);
return true;
}
mLauncher.showOutOfSpaceMessage();
@@ -2738,17 +2758,13 @@ public class Workspace extends SmoothPagedView
* NOTE: This can also be called when we are outside of a drag event, when we want
* to add an item to one of the workspace screens.
*/
- private void onDropExternal(int x, int y, Object dragInfo,
+ private void onDropExternal(int[] touchXY, Object dragInfo,
CellLayout cellLayout, boolean insertAtFirst) {
int screen = indexOfChild(cellLayout);
if (dragInfo instanceof PendingAddItemInfo) {
PendingAddItemInfo info = (PendingAddItemInfo) dragInfo;
// When dragging and dropping from customization tray, we deal with creating
// widgets/shortcuts/folders in a slightly different way
- // Only set touchXY if you are supporting spring loaded adding of items
- int[] touchXY = new int[2];
- touchXY[0] = mSpringLoadedDropX;
- touchXY[1] = mSpringLoadedDropY;
switch (info.itemType) {
case LauncherSettings.Favorites.ITEM_TYPE_APPWIDGET:
mLauncher.addAppWidgetFromDrop((PendingAddWidgetInfo) info, screen, touchXY);
@@ -2787,14 +2803,9 @@ public class Workspace extends SmoothPagedView
}
mTargetCell = new int[2];
- if (x != -1 && y != -1) {
+ if (touchXY != null) {
// when dragging and dropping, just find the closest free spot
-
- // When we get a drop in Spring Loaded mode, at this point we've already called
- // onDragExit, which starts us shrinking again and screws up the transforms we
- // need to get the right value. Instead, as a temporary solution, we've saved the
- // proper point, mSpringLoadedDropX/Y, from the last onDragOver
- cellLayout.findNearestVacantArea(mSpringLoadedDropX, mSpringLoadedDropY, 1, 1, mTargetCell);
+ cellLayout.findNearestVacantArea(touchXY[0], touchXY[1], 1, 1, mTargetCell);
} else {
cellLayout.findCellForSpan(mTargetCell, 1, 1);
}
@@ -2815,11 +2826,8 @@ public class Workspace extends SmoothPagedView
* Return the current {@link CellLayout}, correctly picking the destination
* screen while a scroll is in progress.
*/
- private CellLayout getCurrentDropLayout() {
- // if we're currently small, use findMatchingPageForDragOver instead
- if (mIsSmall) return null;
- int index = mScroller.isFinished() ? mCurrentPage : mNextPage;
- return (CellLayout) getChildAt(index);
+ public CellLayout getCurrentDropLayout() {
+ return (CellLayout) getChildAt(mNextPage == INVALID_PAGE ? mCurrentPage : mNextPage);
}
/**
@@ -2864,7 +2872,7 @@ public class Workspace extends SmoothPagedView
/**
* Called at the end of a drag which originated on the workspace.
*/
- public void onDropCompleted(View target, boolean success) {
+ public void onDropCompleted(View target, Object dragInfo, boolean success) {
if (success) {
if (target != this && mDragInfo != null) {
final CellLayout cellLayout = (CellLayout) getChildAt(mDragInfo.screen);
@@ -2931,6 +2939,10 @@ public class Workspace extends SmoothPagedView
mDragTargetLayout.onDragExit();
mDragTargetLayout = null;
}
+ // In portrait, need to redraw the edge glow when entering the scroll area
+ if (getHeight() > getWidth()) {
+ invalidate();
+ }
}
}
}
@@ -2941,6 +2953,12 @@ public class Workspace extends SmoothPagedView
((CellLayout) getChildAt(i)).setIsDragOverlapping(false);
}
mSpringLoadedDragController.onDragExit();
+
+ // In portrait, workspace is responsible for drawing the edge glow on adjacent pages,
+ // so we need to redraw the workspace when this may have changed.
+ if (getHeight() > getWidth()) {
+ invalidate();
+ }
}
@Override