am 0491f0f1: (-s ours) Import translations. DO NOT MERGE
* commit '0491f0f16d528179206623a086a353f62863df88':
Import translations. DO NOT MERGE
diff --git a/res/drawable-sw600dp-hdpi/homescreen_blue_normal_holo.9.png b/res/drawable-sw600dp-hdpi/homescreen_blue_normal_holo.9.png
deleted file mode 100644
index 98f7ac8..0000000
--- a/res/drawable-sw600dp-hdpi/homescreen_blue_normal_holo.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-sw600dp-hdpi/homescreen_blue_strong_holo.9.png b/res/drawable-sw600dp-hdpi/homescreen_blue_strong_holo.9.png
deleted file mode 100644
index 0a511f9..0000000
--- a/res/drawable-sw600dp-hdpi/homescreen_blue_strong_holo.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-sw600dp-hdpi/ic_allapps.png b/res/drawable-sw600dp-hdpi/ic_allapps.png
deleted file mode 100644
index 8bda435..0000000
--- a/res/drawable-sw600dp-hdpi/ic_allapps.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-sw600dp-hdpi/ic_allapps_pressed.png b/res/drawable-sw600dp-hdpi/ic_allapps_pressed.png
deleted file mode 100644
index 07ff331..0000000
--- a/res/drawable-sw600dp-hdpi/ic_allapps_pressed.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-sw600dp-hdpi/overscroll_glow_left.9.png b/res/drawable-sw600dp-hdpi/overscroll_glow_left.9.png
deleted file mode 100644
index 3928e2c..0000000
--- a/res/drawable-sw600dp-hdpi/overscroll_glow_left.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-sw600dp-hdpi/overscroll_glow_right.9.png b/res/drawable-sw600dp-hdpi/overscroll_glow_right.9.png
deleted file mode 100644
index e34de34..0000000
--- a/res/drawable-sw600dp-hdpi/overscroll_glow_right.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-sw600dp-hdpi/portal_ring_inner_holo.png b/res/drawable-sw600dp-hdpi/portal_ring_inner_holo.png
deleted file mode 100644
index b3be472..0000000
--- a/res/drawable-sw600dp-hdpi/portal_ring_inner_holo.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-sw600dp-hdpi/portal_ring_inner_nolip_holo.png b/res/drawable-sw600dp-hdpi/portal_ring_inner_nolip_holo.png
deleted file mode 100644
index 96b981c..0000000
--- a/res/drawable-sw600dp-hdpi/portal_ring_inner_nolip_holo.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-sw600dp-hdpi/portal_ring_outer_holo.png b/res/drawable-sw600dp-hdpi/portal_ring_outer_holo.png
deleted file mode 100644
index bc13a26..0000000
--- a/res/drawable-sw600dp-hdpi/portal_ring_outer_holo.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-sw600dp-mdpi/homescreen_blue_normal_holo.9.png b/res/drawable-sw600dp-mdpi/homescreen_blue_normal_holo.9.png
deleted file mode 100644
index 3ae4aff..0000000
--- a/res/drawable-sw600dp-mdpi/homescreen_blue_normal_holo.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-sw600dp-mdpi/homescreen_blue_strong_holo.9.png b/res/drawable-sw600dp-mdpi/homescreen_blue_strong_holo.9.png
deleted file mode 100644
index 31148dd..0000000
--- a/res/drawable-sw600dp-mdpi/homescreen_blue_strong_holo.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-sw600dp-mdpi/ic_allapps.png b/res/drawable-sw600dp-mdpi/ic_allapps.png
deleted file mode 100644
index e2afea5..0000000
--- a/res/drawable-sw600dp-mdpi/ic_allapps.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-sw600dp-mdpi/ic_allapps_pressed.png b/res/drawable-sw600dp-mdpi/ic_allapps_pressed.png
deleted file mode 100644
index d409c7e..0000000
--- a/res/drawable-sw600dp-mdpi/ic_allapps_pressed.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-sw600dp-mdpi/overscroll_glow_left.9.png b/res/drawable-sw600dp-mdpi/overscroll_glow_left.9.png
deleted file mode 100644
index 58ec10c..0000000
--- a/res/drawable-sw600dp-mdpi/overscroll_glow_left.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-sw600dp-mdpi/overscroll_glow_right.9.png b/res/drawable-sw600dp-mdpi/overscroll_glow_right.9.png
deleted file mode 100644
index a986fd3..0000000
--- a/res/drawable-sw600dp-mdpi/overscroll_glow_right.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-sw600dp-mdpi/portal_ring_inner_holo.png b/res/drawable-sw600dp-mdpi/portal_ring_inner_holo.png
deleted file mode 100644
index 319c074..0000000
--- a/res/drawable-sw600dp-mdpi/portal_ring_inner_holo.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-sw600dp-mdpi/portal_ring_inner_nolip_holo.png b/res/drawable-sw600dp-mdpi/portal_ring_inner_nolip_holo.png
deleted file mode 100644
index 8537714..0000000
--- a/res/drawable-sw600dp-mdpi/portal_ring_inner_nolip_holo.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-sw600dp-mdpi/portal_ring_outer_holo.png b/res/drawable-sw600dp-mdpi/portal_ring_outer_holo.png
deleted file mode 100644
index 365dcfc..0000000
--- a/res/drawable-sw600dp-mdpi/portal_ring_outer_holo.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-sw600dp-xhdpi/homescreen_blue_normal_holo.9.png b/res/drawable-sw600dp-xhdpi/homescreen_blue_normal_holo.9.png
deleted file mode 100644
index c25b590..0000000
--- a/res/drawable-sw600dp-xhdpi/homescreen_blue_normal_holo.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-sw600dp-xhdpi/homescreen_blue_strong_holo.9.png b/res/drawable-sw600dp-xhdpi/homescreen_blue_strong_holo.9.png
deleted file mode 100644
index 24ac880..0000000
--- a/res/drawable-sw600dp-xhdpi/homescreen_blue_strong_holo.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-sw600dp-xhdpi/ic_allapps.png b/res/drawable-sw600dp-xhdpi/ic_allapps.png
deleted file mode 100644
index 8fed290..0000000
--- a/res/drawable-sw600dp-xhdpi/ic_allapps.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-sw600dp-xhdpi/ic_allapps_pressed.png b/res/drawable-sw600dp-xhdpi/ic_allapps_pressed.png
deleted file mode 100644
index 786b676..0000000
--- a/res/drawable-sw600dp-xhdpi/ic_allapps_pressed.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-sw600dp-xhdpi/overscroll_glow_left.9.png b/res/drawable-sw600dp-xhdpi/overscroll_glow_left.9.png
deleted file mode 100644
index b66dd2f..0000000
--- a/res/drawable-sw600dp-xhdpi/overscroll_glow_left.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-sw600dp-xhdpi/overscroll_glow_right.9.png b/res/drawable-sw600dp-xhdpi/overscroll_glow_right.9.png
deleted file mode 100644
index 3ccce33..0000000
--- a/res/drawable-sw600dp-xhdpi/overscroll_glow_right.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-sw600dp-xhdpi/portal_ring_inner_holo.png b/res/drawable-sw600dp-xhdpi/portal_ring_inner_holo.png
deleted file mode 100644
index d4ce45f..0000000
--- a/res/drawable-sw600dp-xhdpi/portal_ring_inner_holo.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-sw600dp-xhdpi/portal_ring_inner_nolip_holo.png b/res/drawable-sw600dp-xhdpi/portal_ring_inner_nolip_holo.png
deleted file mode 100644
index 9aa13c9..0000000
--- a/res/drawable-sw600dp-xhdpi/portal_ring_inner_nolip_holo.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-sw600dp-xhdpi/portal_ring_outer_holo.png b/res/drawable-sw600dp-xhdpi/portal_ring_outer_holo.png
deleted file mode 100644
index 0106cd6..0000000
--- a/res/drawable-sw600dp-xhdpi/portal_ring_outer_holo.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-sw600dp-xxhdpi/homescreen_blue_normal_holo.9.png b/res/drawable-sw600dp-xxhdpi/homescreen_blue_normal_holo.9.png
deleted file mode 100644
index c661f68..0000000
--- a/res/drawable-sw600dp-xxhdpi/homescreen_blue_normal_holo.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-sw600dp-xxhdpi/homescreen_blue_strong_holo.9.png b/res/drawable-sw600dp-xxhdpi/homescreen_blue_strong_holo.9.png
deleted file mode 100644
index bf6ab97..0000000
--- a/res/drawable-sw600dp-xxhdpi/homescreen_blue_strong_holo.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-sw600dp-xxhdpi/ic_allapps.png b/res/drawable-sw600dp-xxhdpi/ic_allapps.png
deleted file mode 100644
index 2429656..0000000
--- a/res/drawable-sw600dp-xxhdpi/ic_allapps.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-sw600dp-xxhdpi/ic_allapps_pressed.png b/res/drawable-sw600dp-xxhdpi/ic_allapps_pressed.png
deleted file mode 100644
index b93a51b..0000000
--- a/res/drawable-sw600dp-xxhdpi/ic_allapps_pressed.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-sw600dp-xxhdpi/overscroll_glow_left.9.png b/res/drawable-sw600dp-xxhdpi/overscroll_glow_left.9.png
deleted file mode 100644
index 472c3f9..0000000
--- a/res/drawable-sw600dp-xxhdpi/overscroll_glow_left.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-sw600dp-xxhdpi/overscroll_glow_right.9.png b/res/drawable-sw600dp-xxhdpi/overscroll_glow_right.9.png
deleted file mode 100644
index e30cc97..0000000
--- a/res/drawable-sw600dp-xxhdpi/overscroll_glow_right.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-sw600dp-xxhdpi/portal_ring_inner_holo.png b/res/drawable-sw600dp-xxhdpi/portal_ring_inner_holo.png
deleted file mode 100644
index 65b2541..0000000
--- a/res/drawable-sw600dp-xxhdpi/portal_ring_inner_holo.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-sw600dp-xxhdpi/portal_ring_inner_nolip_holo.png b/res/drawable-sw600dp-xxhdpi/portal_ring_inner_nolip_holo.png
deleted file mode 100644
index 5068646..0000000
--- a/res/drawable-sw600dp-xxhdpi/portal_ring_inner_nolip_holo.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-sw600dp-xxhdpi/portal_ring_outer_holo.png b/res/drawable-sw600dp-xxhdpi/portal_ring_outer_holo.png
deleted file mode 100644
index 6628425..0000000
--- a/res/drawable-sw600dp-xxhdpi/portal_ring_outer_holo.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-sw720dp-hdpi/workspace_bg.9.png b/res/drawable-sw720dp-hdpi/workspace_bg.9.png
deleted file mode 100644
index 5bbfa4f..0000000
--- a/res/drawable-sw720dp-hdpi/workspace_bg.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-sw720dp-mdpi/workspace_bg.9.png b/res/drawable-sw720dp-mdpi/workspace_bg.9.png
deleted file mode 100644
index 2856e09..0000000
--- a/res/drawable-sw720dp-mdpi/workspace_bg.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-sw720dp-xhdpi/workspace_bg.9.png b/res/drawable-sw720dp-xhdpi/workspace_bg.9.png
deleted file mode 100644
index 72269f2..0000000
--- a/res/drawable-sw720dp-xhdpi/workspace_bg.9.png
+++ /dev/null
Binary files differ
diff --git a/res/layout-land/all_apps_cling.xml b/res/layout-land/all_apps_cling.xml
deleted file mode 100644
index 820f00a..0000000
--- a/res/layout-land/all_apps_cling.xml
+++ /dev/null
@@ -1,48 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2011 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<com.android.launcher3.Cling
- xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:launcher="http://schemas.android.com/apk/res-auto/com.android.launcher3"
- launcher:drawIdentifier="all_apps_landscape">
- <FrameLayout
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layout_marginStart="40dp"
- android:layout_marginTop="40dp">
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="vertical">
- <TextView
- style="@style/ClingTitleText"
- android:id="@+id/all_apps_cling_title"
- android:text="@string/all_apps_cling_title" />
- <TextView
- style="@style/ClingText"
- android:id="@+id/all_apps_cling_add_item"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:text="@string/all_apps_cling_add_item" />
- </LinearLayout>
- </FrameLayout>
- <Button
- style="@style/ClingButton"
- android:id="@+id/cling_dismiss"
- android:layout_marginBottom="15dp"
- android:layout_marginEnd="10dp"
- android:layout_gravity="bottom|end"
- android:onClick="dismissAllAppsCling" />
-</com.android.launcher3.Cling>
diff --git a/res/layout-land/launcher.xml b/res/layout-land/launcher.xml
index 77ea2e9..bf670d4 100644
--- a/res/layout-land/launcher.xml
+++ b/res/layout-land/launcher.xml
@@ -36,9 +36,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
- launcher:defaultScreen="@integer/config_workspaceDefaultScreen"
- launcher:pageSpacing="@dimen/workspace_page_spacing"
- launcher:pageIndicator="@id/page_indicator" />
+ launcher:defaultScreen="@integer/config_workspaceDefaultScreen" />
<include layout="@layout/hotseat"
android:id="@+id/hotseat"
diff --git a/res/layout-port/all_apps_cling.xml b/res/layout-port/all_apps_cling.xml
deleted file mode 100644
index 62284ec..0000000
--- a/res/layout-port/all_apps_cling.xml
+++ /dev/null
@@ -1,48 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2011 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<com.android.launcher3.Cling
- xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:launcher="http://schemas.android.com/apk/res-auto/com.android.launcher3"
- launcher:drawIdentifier="all_apps_portrait">
- <FrameLayout
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layout_marginStart="20dp"
- android:layout_marginTop="20dp">
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="vertical">
- <TextView
- style="@style/ClingTitleText"
- android:id="@+id/all_apps_cling_title"
- android:text="@string/all_apps_cling_title" />
- <TextView
- style="@style/ClingText"
- android:id="@+id/all_apps_cling_add_item"
- android:layout_width="285dp"
- android:layout_height="wrap_content"
- android:text="@string/all_apps_cling_add_item" />
- </LinearLayout>
- </FrameLayout>
- <Button
- style="@style/ClingButton"
- android:id="@+id/cling_dismiss"
- android:layout_marginBottom="15dp"
- android:layout_marginEnd="10dp"
- android:layout_gravity="bottom|end"
- android:onClick="dismissAllAppsCling" />
-</com.android.launcher3.Cling>
diff --git a/res/layout-port/first_run_cling.xml b/res/layout-port/first_run_cling.xml
index 4830e5d..ac3939c 100644
--- a/res/layout-port/first_run_cling.xml
+++ b/res/layout-port/first_run_cling.xml
@@ -39,16 +39,14 @@
android:layout_marginBottom="10dp"
android:text="@string/first_run_cling_title"
android:textColor="#FFFFFFFF"
- android:textSize="30sp"
android:gravity="center" />
<TextView
- style="@style/ClingAltTitleText"
+ style="@style/ClingAltText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:text="@string/first_run_cling_description"
android:textColor="#80000000"
- android:textSize="16sp"
android:gravity="center" />
</LinearLayout>
<TextView
diff --git a/res/layout-port/launcher.xml b/res/layout-port/launcher.xml
index 6fbf7c7..2b3cf81 100644
--- a/res/layout-port/launcher.xml
+++ b/res/layout-port/launcher.xml
@@ -35,8 +35,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
launcher:defaultScreen="@integer/config_workspaceDefaultScreen"
- launcher:pageSpacing="@dimen/workspace_page_spacing"
- launcher:pageIndicator="@id/page_indicator">
+ launcher:pageIndicator="@+id/page_indicator">
</com.android.launcher3.Workspace>
<include layout="@layout/hotseat"
diff --git a/res/layout-sw600dp-port/all_apps_cling.xml b/res/layout-sw600dp-port/all_apps_cling.xml
deleted file mode 100644
index cf65e41..0000000
--- a/res/layout-sw600dp-port/all_apps_cling.xml
+++ /dev/null
@@ -1,50 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2011 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<com.android.launcher3.Cling
- xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:launcher="http://schemas.android.com/apk/res-auto/com.android.launcher3"
- launcher:drawIdentifier="all_apps_portrait">
- <FrameLayout
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layout_marginStart="20dp"
- android:layout_marginTop="20dp">
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="vertical">
- <TextView
- style="@style/ClingTitleText"
- android:id="@+id/all_apps_cling_title"
- android:text="@string/all_apps_cling_title" />
- <TextView
- style="@style/ClingText"
- android:id="@+id/all_apps_cling_add_item"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:text="@string/all_apps_cling_add_item" />
- </LinearLayout>
- </FrameLayout>
- <Button
- style="@style/ClingButton"
- android:id="@+id/cling_dismiss"
- android:minWidth="168dp"
- android:textSize="24sp"
- android:layout_marginTop="235dp"
- android:layout_marginEnd="36dp"
- android:layout_gravity="top|end"
- android:onClick="dismissAllAppsCling" />
-</com.android.launcher3.Cling>
diff --git a/res/layout-sw720dp/all_apps_cling.xml b/res/layout-sw720dp/all_apps_cling.xml
deleted file mode 100644
index 824d84f..0000000
--- a/res/layout-sw720dp/all_apps_cling.xml
+++ /dev/null
@@ -1,46 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2011 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<com.android.launcher3.Cling
- xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:launcher="http://schemas.android.com/apk/res-auto/com.android.launcher3"
- launcher:drawIdentifier="all_apps_large">
- <FrameLayout
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layout_marginStart="@dimen/cling_text_block_offset_x"
- android:layout_marginTop="@dimen/cling_text_block_offset_y">
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="vertical">
- <TextView
- style="@style/ClingTitleText"
- android:id="@+id/all_apps_cling_title"
- android:text="@string/all_apps_cling_title" />
- <TextView
- style="@style/ClingText"
- android:id="@+id/all_apps_cling_add_item"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:text="@string/all_apps_cling_add_item" />
- <Button
- style="@style/ClingButton"
- android:id="@+id/cling_dismiss"
- android:layout_marginTop="15dp"
- android:onClick="dismissAllAppsCling" />
- </LinearLayout>
- </FrameLayout>
-</com.android.launcher3.Cling>
diff --git a/res/layout-sw720dp/launcher.xml b/res/layout-sw720dp/launcher.xml
index 951e63a..7dac271 100644
--- a/res/layout-sw720dp/launcher.xml
+++ b/res/layout-sw720dp/launcher.xml
@@ -36,7 +36,6 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
launcher:defaultScreen="@integer/config_workspaceDefaultScreen"
- launcher:pageSpacing="@dimen/workspace_page_spacing"
launcher:pageIndicator="@id/page_indicator">
</com.android.launcher3.Workspace>
diff --git a/res/layout/apps_customize_pane.xml b/res/layout/apps_customize_pane.xml
index 11a938f..eae216e 100644
--- a/res/layout/apps_customize_pane.xml
+++ b/res/layout/apps_customize_pane.xml
@@ -56,13 +56,12 @@
android:id="@+id/apps_customize_pane_content"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:layout_marginBottom="@dimen/apps_customize_page_indicator_offset"
launcher:widgetCountX="@integer/apps_customize_widget_cell_count_x"
launcher:widgetCountY="@integer/apps_customize_widget_cell_count_y"
launcher:clingFocusedX="@integer/apps_customize_cling_focused_x"
launcher:clingFocusedY="@integer/apps_customize_cling_focused_y"
launcher:maxGap="@dimen/workspace_max_gap"
- launcher:pageIndicator="@+id/page_indicator" />
+ launcher:pageIndicator="@+id/apps_customize_page_indicator" />
<FrameLayout
android:id="@+id/animation_buffer"
android:layout_width="match_parent"
@@ -70,12 +69,11 @@
android:background="#FF000000"
android:visibility="gone" />
<include
- android:id="@+id/page_indicator"
+ android:id="@+id/apps_customize_page_indicator"
layout="@layout/page_indicator"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_gravity="bottom|center_horizontal"
- android:layout_marginBottom="@dimen/apps_customize_page_indicator_margin" />
+ android:layout_gravity="center_horizontal|bottom" />
</FrameLayout>
</LinearLayout>
</com.android.launcher3.AppsCustomizeTabHost>
diff --git a/res/layout/folder_icon.xml b/res/layout/folder_icon.xml
index 4405682..5147f99 100644
--- a/res/layout/folder_icon.xml
+++ b/res/layout/folder_icon.xml
@@ -30,5 +30,8 @@
android:src="@drawable/portal_ring_inner_holo"/>
<com.android.launcher3.BubbleTextView
style="@style/WorkspaceIcon"
- android:id="@+id/folder_icon_name" />
+ android:id="@+id/folder_icon_name"
+ android:layout_gravity="top"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent" />
</com.android.launcher3.FolderIcon>
diff --git a/res/layout/wallpaper_cropper.xml b/res/layout/wallpaper_cropper.xml
index 3a3d98a..abb8608 100644
--- a/res/layout/wallpaper_cropper.xml
+++ b/res/layout/wallpaper_cropper.xml
@@ -32,7 +32,7 @@
android:visibility="invisible"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_gravity="center"
+ android:layout_centerInParent="true"
android:indeterminate="true"
android:indeterminateOnly="true"
android:background="@android:color/transparent" />
diff --git a/res/layout/wallpaper_picker.xml b/res/layout/wallpaper_picker.xml
index c91cc7e..c36493d 100644
--- a/res/layout/wallpaper_picker.xml
+++ b/res/layout/wallpaper_picker.xml
@@ -33,7 +33,7 @@
android:visibility="invisible"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_gravity="center"
+ android:layout_centerInParent="true"
android:indeterminate="true"
android:indeterminateOnly="true"
android:background="@android:color/transparent" />
diff --git a/res/values-af/strings.xml b/res/values-af/strings.xml
index e167189..de987bd 100644
--- a/res/values-af/strings.xml
+++ b/res/values-af/strings.xml
@@ -24,6 +24,8 @@
<string name="uid_name" msgid="7820867637514617527">"Android-kernprogramme"</string>
<string name="folder_name" msgid="7371454440695724752"></string>
<string name="wallpaper_instructions" msgid="563973358787555519">"Stel muurpapier"</string>
+ <string name="image_load_fail" msgid="2821429163328561136">"Kon prent nie laai nie"</string>
+ <string name="wallpaper_load_fail" msgid="1261270681127096352">"Kon prent nie as muurpapier laai nie"</string>
<plurals name="number_of_items_selected">
<item quantity="zero" msgid="7464587177007785408">"%1$d gekies"</item>
<item quantity="one" msgid="142482526010824029">"%1$d gekies"</item>
@@ -103,8 +105,6 @@
<string name="first_run_cling_create_screens_hint" msgid="6950729526680114157">"Skep meer skerms vir programme en vouers"</string>
<string name="workspace_cling_title" msgid="5626202359865825661">"Organiseer jou spasie"</string>
<string name="workspace_cling_move_item" msgid="528201129978005352">"Raak en hou agtergrond om muurpapier, legstukke en instellings te bestuur."</string>
- <string name="all_apps_cling_title" msgid="34929250753095858">"Kies \'n paar programme"</string>
- <string name="all_apps_cling_add_item" msgid="400866858451850784">"Om \'n program by jou Tuisskerm te voeg, raak en hou dit."</string>
<string name="folder_cling_title" msgid="3894908818693254164">"Hier\'s \'n vouer"</string>
<string name="folder_cling_create_folder" msgid="6158215559475836131">"Om een soos dié te skep, raak en hou \'n program en skuif dit dan oor \'n ander een."</string>
<string name="cling_dismiss" msgid="8962359497601507581">"OK"</string>
diff --git a/res/values-am/strings.xml b/res/values-am/strings.xml
index 6e8aaa4..dc64c5d 100644
--- a/res/values-am/strings.xml
+++ b/res/values-am/strings.xml
@@ -24,6 +24,8 @@
<string name="uid_name" msgid="7820867637514617527">"Android ዋና መተግበሪያዎች"</string>
<string name="folder_name" msgid="7371454440695724752"></string>
<string name="wallpaper_instructions" msgid="563973358787555519">"የግድግዳ ወረቀት አዘጋጅ"</string>
+ <string name="image_load_fail" msgid="2821429163328561136">"ምስሉን መጫን አልተቻለም"</string>
+ <string name="wallpaper_load_fail" msgid="1261270681127096352">"ምስሉን እንደ ግድግዳ ወረቀት መጫን አልተቻለም"</string>
<plurals name="number_of_items_selected">
<item quantity="zero" msgid="7464587177007785408">"%1$d ተመርጧል"</item>
<item quantity="one" msgid="142482526010824029">"%1$d ተመርጧል"</item>
@@ -103,8 +105,6 @@
<string name="first_run_cling_create_screens_hint" msgid="6950729526680114157">"ለመተግበሪያዎች እና አቃፊዎች ተጨማሪ ማያ ገጾችን ይፍጠሩ"</string>
<string name="workspace_cling_title" msgid="5626202359865825661">"ቦታዎን ያደራጁ"</string>
<string name="workspace_cling_move_item" msgid="528201129978005352">"የግድግዳ ወረቀት፣ ምግብሮችን እና ቅንብሮችን ለማቀናበር ጀርባውን ይንኩ እና ይያዙት።"</string>
- <string name="all_apps_cling_title" msgid="34929250753095858">"አንዳንድ መተግበሪያዎችን ይምረጡ"</string>
- <string name="all_apps_cling_add_item" msgid="400866858451850784">"አንድ መተግበሪያ ወደ መነሻ ማያ ገጽዎ ለማከል ይንኩት እና ይያዙት።"</string>
<string name="folder_cling_title" msgid="3894908818693254164">"አንድ አቃፊ እነሆ"</string>
<string name="folder_cling_create_folder" msgid="6158215559475836131">"አንድ እንደዚህ አይነት ለመፍጠር መተግበሪያውን ነክተው ይያዙት እና ወደ ሌላ ያንቀሳቅሱት።"</string>
<string name="cling_dismiss" msgid="8962359497601507581">"እሺ"</string>
diff --git a/res/values-ar/strings.xml b/res/values-ar/strings.xml
index 4794772..84c157e 100644
--- a/res/values-ar/strings.xml
+++ b/res/values-ar/strings.xml
@@ -24,6 +24,8 @@
<string name="uid_name" msgid="7820867637514617527">"تطبيقات Android الأساسية"</string>
<string name="folder_name" msgid="7371454440695724752"></string>
<string name="wallpaper_instructions" msgid="563973358787555519">"تعيين خلفية"</string>
+ <string name="image_load_fail" msgid="2821429163328561136">"تعذر تحميل الصورة"</string>
+ <string name="wallpaper_load_fail" msgid="1261270681127096352">"تعذر تحميل الصورة كخلفية"</string>
<plurals name="number_of_items_selected">
<item quantity="zero" msgid="7464587177007785408">"تم تحديد %1$d"</item>
<item quantity="one" msgid="142482526010824029">"تم تحديد %1$d"</item>
@@ -103,8 +105,6 @@
<string name="first_run_cling_create_screens_hint" msgid="6950729526680114157">"إنشاء المزيد من الشاشات للتطبيقات والمجلدات"</string>
<string name="workspace_cling_title" msgid="5626202359865825661">"تنظيم مساحتك"</string>
<string name="workspace_cling_move_item" msgid="528201129978005352">"المس مع الاستمرار الجزء الخلفي من صورة الشاشة لإدارة الخلفية والأدوات والإعدادات."</string>
- <string name="all_apps_cling_title" msgid="34929250753095858">"اختيار بعض التطبيقات"</string>
- <string name="all_apps_cling_add_item" msgid="400866858451850784">"لإضافة تطبيق إلى الشاشة الرئيسية، المسه مع الاستمرار."</string>
<string name="folder_cling_title" msgid="3894908818693254164">"إليك المجلد"</string>
<string name="folder_cling_create_folder" msgid="6158215559475836131">"لإنشاء مجلد مثل هذا، المس أحد التطبيقات مع استمرار اللمس، ثم حركه فوق آخر."</string>
<string name="cling_dismiss" msgid="8962359497601507581">"موافق"</string>
diff --git a/res/values-be/strings.xml b/res/values-be/strings.xml
index ddcf404..2015158 100644
--- a/res/values-be/strings.xml
+++ b/res/values-be/strings.xml
@@ -28,6 +28,10 @@
<string name="folder_name" msgid="7371454440695724752"></string>
<!-- no translation found for wallpaper_instructions (563973358787555519) -->
<skip />
+ <!-- no translation found for image_load_fail (2821429163328561136) -->
+ <skip />
+ <!-- no translation found for wallpaper_load_fail (1261270681127096352) -->
+ <skip />
<!-- no translation found for number_of_items_selected:zero (7464587177007785408) -->
<!-- no translation found for number_of_items_selected:one (142482526010824029) -->
<!-- no translation found for number_of_items_selected:other (1418352074806573570) -->
@@ -177,10 +181,6 @@
<skip />
<!-- no translation found for workspace_cling_move_item (528201129978005352) -->
<skip />
- <!-- no translation found for all_apps_cling_title (34929250753095858) -->
- <skip />
- <!-- no translation found for all_apps_cling_add_item (400866858451850784) -->
- <skip />
<!-- no translation found for folder_cling_title (3894908818693254164) -->
<skip />
<!-- no translation found for folder_cling_create_folder (6158215559475836131) -->
diff --git a/res/values-bg/strings.xml b/res/values-bg/strings.xml
index 2f53fa3..e57e9d2 100644
--- a/res/values-bg/strings.xml
+++ b/res/values-bg/strings.xml
@@ -24,6 +24,8 @@
<string name="uid_name" msgid="7820867637514617527">"Основни приложения на Android"</string>
<string name="folder_name" msgid="7371454440695724752"></string>
<string name="wallpaper_instructions" msgid="563973358787555519">"Задаване на тапета"</string>
+ <string name="image_load_fail" msgid="2821429163328561136">"Изображението не можа да бъде заредено"</string>
+ <string name="wallpaper_load_fail" msgid="1261270681127096352">"Изображението не можа да бъде заредено като тапет"</string>
<plurals name="number_of_items_selected">
<item quantity="zero" msgid="7464587177007785408">"Избрахте %1$d"</item>
<item quantity="one" msgid="142482526010824029">"Избрахте %1$d"</item>
@@ -103,8 +105,6 @@
<string name="first_run_cling_create_screens_hint" msgid="6950729526680114157">"Създаване на още екрани за приложения и папки"</string>
<string name="workspace_cling_title" msgid="5626202359865825661">"Организиране на мястото ви"</string>
<string name="workspace_cling_move_item" msgid="528201129978005352">"Докоснете и задръжте фона, за да управлявате тапета, приспособленията и настройките."</string>
- <string name="all_apps_cling_title" msgid="34929250753095858">"Изберете някои приложения"</string>
- <string name="all_apps_cling_add_item" msgid="400866858451850784">"За да добавите приложение към началния си екран, го докоснете и задръжте."</string>
<string name="folder_cling_title" msgid="3894908818693254164">"Ето една папка"</string>
<string name="folder_cling_create_folder" msgid="6158215559475836131">"За да създадете подобна, докоснете и задръжте приложение, след което го преместете върху друго."</string>
<string name="cling_dismiss" msgid="8962359497601507581">"ОK"</string>
diff --git a/res/values-ca/strings.xml b/res/values-ca/strings.xml
index 3400482..a9eb99c 100644
--- a/res/values-ca/strings.xml
+++ b/res/values-ca/strings.xml
@@ -24,6 +24,8 @@
<string name="uid_name" msgid="7820867637514617527">"Aplicacions principals d\'Android"</string>
<string name="folder_name" msgid="7371454440695724752"></string>
<string name="wallpaper_instructions" msgid="563973358787555519">"Estableix el fons de pantalla"</string>
+ <string name="image_load_fail" msgid="2821429163328561136">"No s\'ha pogut carregar la imatge."</string>
+ <string name="wallpaper_load_fail" msgid="1261270681127096352">"No s\'ha pogut carregar la imatge com a fons de pantalla."</string>
<plurals name="number_of_items_selected">
<item quantity="zero" msgid="7464587177007785408">"Seleccionats: %1$d"</item>
<item quantity="one" msgid="142482526010824029">"Seleccionats: %1$d"</item>
@@ -103,8 +105,6 @@
<string name="first_run_cling_create_screens_hint" msgid="6950729526680114157">"Crea més pantalles per a aplicacions i carpetes"</string>
<string name="workspace_cling_title" msgid="5626202359865825661">"Organitza el teu espai"</string>
<string name="workspace_cling_move_item" msgid="528201129978005352">"Toca i mantén premut el fons per gestionar el fons de pantalla, els widgets i la configuració."</string>
- <string name="all_apps_cling_title" msgid="34929250753095858">"Tria unes quantes aplicacions"</string>
- <string name="all_apps_cling_add_item" msgid="400866858451850784">"Per afegir una aplicació a la pantalla d\'inici, mantén-la premuda."</string>
<string name="folder_cling_title" msgid="3894908818693254164">"Aquí hi ha una carpeta"</string>
<string name="folder_cling_create_folder" msgid="6158215559475836131">"Per crear-ne una com aquesta, mantén premuda una aplicació i, a continuació, mou-la sobre una altra."</string>
<string name="cling_dismiss" msgid="8962359497601507581">"D\'acord"</string>
diff --git a/res/values-cs/strings.xml b/res/values-cs/strings.xml
index 1061e79..258f645 100644
--- a/res/values-cs/strings.xml
+++ b/res/values-cs/strings.xml
@@ -24,6 +24,8 @@
<string name="uid_name" msgid="7820867637514617527">"Android Core Apps"</string>
<string name="folder_name" msgid="7371454440695724752"></string>
<string name="wallpaper_instructions" msgid="563973358787555519">"Nastavit jako tapetu"</string>
+ <string name="image_load_fail" msgid="2821429163328561136">"Obrázek nelze načíst."</string>
+ <string name="wallpaper_load_fail" msgid="1261270681127096352">"Obrázek nelze načíst jako tapetu."</string>
<plurals name="number_of_items_selected">
<item quantity="zero" msgid="7464587177007785408">"Vybráno: %1$d"</item>
<item quantity="one" msgid="142482526010824029">"Vybráno: %1$d"</item>
@@ -103,8 +105,6 @@
<string name="first_run_cling_create_screens_hint" msgid="6950729526680114157">"Vytvořte několik obrazovek pro aplikace a složky"</string>
<string name="workspace_cling_title" msgid="5626202359865825661">"Organizace prostoru"</string>
<string name="workspace_cling_move_item" msgid="528201129978005352">"Chcete-li spravovat tapetu, widgety a nastavení, dotkněte se pozadí a přidržte je."</string>
- <string name="all_apps_cling_title" msgid="34929250753095858">"Vyberte nějaké aplikace"</string>
- <string name="all_apps_cling_add_item" msgid="400866858451850784">"Chcete-li na plochu přidat aplikaci, dotkněte se jí a přidržte ji."</string>
<string name="folder_cling_title" msgid="3894908818693254164">"Toto je složka"</string>
<string name="folder_cling_create_folder" msgid="6158215559475836131">"Chcete-li vytvořit složku, přetáhněte aplikaci na jinou aplikaci."</string>
<string name="cling_dismiss" msgid="8962359497601507581">"OK"</string>
diff --git a/res/values-da/strings.xml b/res/values-da/strings.xml
index 5db246e..96b6af6 100644
--- a/res/values-da/strings.xml
+++ b/res/values-da/strings.xml
@@ -24,6 +24,8 @@
<string name="uid_name" msgid="7820867637514617527">"Kerneapps i Android"</string>
<string name="folder_name" msgid="7371454440695724752"></string>
<string name="wallpaper_instructions" msgid="563973358787555519">"Angiv baggrund"</string>
+ <string name="image_load_fail" msgid="2821429163328561136">"Billedet kunne ikke indlæses"</string>
+ <string name="wallpaper_load_fail" msgid="1261270681127096352">"Billedet kunne ikke indlæses som baggrund"</string>
<plurals name="number_of_items_selected">
<item quantity="zero" msgid="7464587177007785408">"%1$d er valgt"</item>
<item quantity="one" msgid="142482526010824029">"%1$d er valgt"</item>
@@ -103,8 +105,6 @@
<string name="first_run_cling_create_screens_hint" msgid="6950729526680114157">"Opret flere skærme til apps og mapper"</string>
<string name="workspace_cling_title" msgid="5626202359865825661">"Organiser din arbejdsplads"</string>
<string name="workspace_cling_move_item" msgid="528201129978005352">"Tryk på en baggrund, og hold fingeren nede for at administrere baggrunde, widgets og indstillinger."</string>
- <string name="all_apps_cling_title" msgid="34929250753095858">"Vælge nogle apps"</string>
- <string name="all_apps_cling_add_item" msgid="400866858451850784">"Tryk på en app, og hold fingeren nede for at føje appen til startskærmen."</string>
<string name="folder_cling_title" msgid="3894908818693254164">"Her kan du se en mappe"</string>
<string name="folder_cling_create_folder" msgid="6158215559475836131">"Du kan oprette en mappe magen til denne ved at trykke på en app og holde fingeren nede, mens du flytter appen til en anden mappe."</string>
<string name="cling_dismiss" msgid="8962359497601507581">"OK"</string>
diff --git a/res/values-de/strings.xml b/res/values-de/strings.xml
index 85e42cf..b95d482 100644
--- a/res/values-de/strings.xml
+++ b/res/values-de/strings.xml
@@ -24,6 +24,8 @@
<string name="uid_name" msgid="7820867637514617527">"Android Core Apps"</string>
<string name="folder_name" msgid="7371454440695724752"></string>
<string name="wallpaper_instructions" msgid="563973358787555519">"Hintergrund auswählen"</string>
+ <string name="image_load_fail" msgid="2821429163328561136">"Bild konnte nicht geladen werden."</string>
+ <string name="wallpaper_load_fail" msgid="1261270681127096352">"Bild konnte nicht als Hintergrund geladen werden."</string>
<plurals name="number_of_items_selected">
<item quantity="zero" msgid="7464587177007785408">"%1$d ausgewählt"</item>
<item quantity="one" msgid="142482526010824029">"%1$d ausgewählt"</item>
@@ -103,8 +105,6 @@
<string name="first_run_cling_create_screens_hint" msgid="6950729526680114157">"Mehr Bildschirme für Apps und Ordner erstellen"</string>
<string name="workspace_cling_title" msgid="5626202359865825661">"Arbeitsbereich organisieren"</string>
<string name="workspace_cling_move_item" msgid="528201129978005352">"Hintergrund berühren und halten, um Hintergrund, Widgets und Einstellungen zu verwalten"</string>
- <string name="all_apps_cling_title" msgid="34929250753095858">"Apps auswählen"</string>
- <string name="all_apps_cling_add_item" msgid="400866858451850784">"Berühren und halten Sie eine App, um sie zum Startbildschirm hinzuzufügen."</string>
<string name="folder_cling_title" msgid="3894908818693254164">"Hier ist ein Ordner"</string>
<string name="folder_cling_create_folder" msgid="6158215559475836131">"Um einen Ordner zu erstellen, berühren und halten Sie eine App und verschieben Sie sie auf eine andere."</string>
<string name="cling_dismiss" msgid="8962359497601507581">"OK"</string>
diff --git a/res/values-el/strings.xml b/res/values-el/strings.xml
index 74322e0..2c3f3f5 100644
--- a/res/values-el/strings.xml
+++ b/res/values-el/strings.xml
@@ -24,6 +24,8 @@
<string name="uid_name" msgid="7820867637514617527">"Βασικές εφαρμογές Android"</string>
<string name="folder_name" msgid="7371454440695724752"></string>
<string name="wallpaper_instructions" msgid="563973358787555519">"Ορισμός ταπετσαρίας"</string>
+ <string name="image_load_fail" msgid="2821429163328561136">"Δεν ήταν δυνατή η φόρτωση της εικόνας"</string>
+ <string name="wallpaper_load_fail" msgid="1261270681127096352">"Δεν ήταν δυνατή η φόρτωση της εικόνας ως ταπετσαρία"</string>
<plurals name="number_of_items_selected">
<item quantity="zero" msgid="7464587177007785408">"%1$d επιλεγμένα"</item>
<item quantity="one" msgid="142482526010824029">"%1$d επιλεγμένα"</item>
@@ -103,8 +105,6 @@
<string name="first_run_cling_create_screens_hint" msgid="6950729526680114157">"Δημιουργία περισσότερων οθονών για εφαρμογές και φακέλους"</string>
<string name="workspace_cling_title" msgid="5626202359865825661">"Οργανώστε το χώρο σας"</string>
<string name="workspace_cling_move_item" msgid="528201129978005352">"Αγγίξτε παρατεταμένα το φόντο για να διαχειριστείτε την ταπετσαρία, τα γραφικά στοιχεία και τις ρυθμίσεις."</string>
- <string name="all_apps_cling_title" msgid="34929250753095858">"Επιλέξτε ορισμένες εφαρμογές"</string>
- <string name="all_apps_cling_add_item" msgid="400866858451850784">"Για να προσθέσετε μια εφαρμογή στην αρχική σας οθόνη, αγγίξτε την παρατεταμένα."</string>
<string name="folder_cling_title" msgid="3894908818693254164">"Ορίστε ένας φάκελος"</string>
<string name="folder_cling_create_folder" msgid="6158215559475836131">"Για να δημιουργήσετε έναν φάκελο σαν κι αυτόν, πατήστε παρατεταμένα μια εφαρμογή και στη συνέχεια, μετακινήστε τη πάνω σε μια άλλη."</string>
<string name="cling_dismiss" msgid="8962359497601507581">"OK"</string>
diff --git a/res/values-en-rGB/strings.xml b/res/values-en-rGB/strings.xml
index 316585e..0e3e559 100644
--- a/res/values-en-rGB/strings.xml
+++ b/res/values-en-rGB/strings.xml
@@ -24,6 +24,8 @@
<string name="uid_name" msgid="7820867637514617527">"Android Core Apps"</string>
<string name="folder_name" msgid="7371454440695724752"></string>
<string name="wallpaper_instructions" msgid="563973358787555519">"Set wallpaper"</string>
+ <string name="image_load_fail" msgid="2821429163328561136">"Coudn\'t load image"</string>
+ <string name="wallpaper_load_fail" msgid="1261270681127096352">"Couldn\'t load image as wallpaper"</string>
<plurals name="number_of_items_selected">
<item quantity="zero" msgid="7464587177007785408">"%1$d selected"</item>
<item quantity="one" msgid="142482526010824029">"%1$d selected"</item>
@@ -103,8 +105,6 @@
<string name="first_run_cling_create_screens_hint" msgid="6950729526680114157">"Create more screens for apps and folders"</string>
<string name="workspace_cling_title" msgid="5626202359865825661">"Organise your space"</string>
<string name="workspace_cling_move_item" msgid="528201129978005352">"Touch & hold background to manage wallpaper, widgets and settings."</string>
- <string name="all_apps_cling_title" msgid="34929250753095858">"Choose some apps"</string>
- <string name="all_apps_cling_add_item" msgid="400866858451850784">"To add an app to your Home screen, touch & hold it."</string>
<string name="folder_cling_title" msgid="3894908818693254164">"Here\'s a folder"</string>
<string name="folder_cling_create_folder" msgid="6158215559475836131">"To create one like this, touch & hold an app, then move it over another."</string>
<string name="cling_dismiss" msgid="8962359497601507581">"OK"</string>
diff --git a/res/values-en-rIN/strings.xml b/res/values-en-rIN/strings.xml
index 316585e..0e3e559 100644
--- a/res/values-en-rIN/strings.xml
+++ b/res/values-en-rIN/strings.xml
@@ -24,6 +24,8 @@
<string name="uid_name" msgid="7820867637514617527">"Android Core Apps"</string>
<string name="folder_name" msgid="7371454440695724752"></string>
<string name="wallpaper_instructions" msgid="563973358787555519">"Set wallpaper"</string>
+ <string name="image_load_fail" msgid="2821429163328561136">"Coudn\'t load image"</string>
+ <string name="wallpaper_load_fail" msgid="1261270681127096352">"Couldn\'t load image as wallpaper"</string>
<plurals name="number_of_items_selected">
<item quantity="zero" msgid="7464587177007785408">"%1$d selected"</item>
<item quantity="one" msgid="142482526010824029">"%1$d selected"</item>
@@ -103,8 +105,6 @@
<string name="first_run_cling_create_screens_hint" msgid="6950729526680114157">"Create more screens for apps and folders"</string>
<string name="workspace_cling_title" msgid="5626202359865825661">"Organise your space"</string>
<string name="workspace_cling_move_item" msgid="528201129978005352">"Touch & hold background to manage wallpaper, widgets and settings."</string>
- <string name="all_apps_cling_title" msgid="34929250753095858">"Choose some apps"</string>
- <string name="all_apps_cling_add_item" msgid="400866858451850784">"To add an app to your Home screen, touch & hold it."</string>
<string name="folder_cling_title" msgid="3894908818693254164">"Here\'s a folder"</string>
<string name="folder_cling_create_folder" msgid="6158215559475836131">"To create one like this, touch & hold an app, then move it over another."</string>
<string name="cling_dismiss" msgid="8962359497601507581">"OK"</string>
diff --git a/res/values-en/dimens.xml b/res/values-en/dimens.xml
new file mode 100644
index 0000000..01d4693
--- /dev/null
+++ b/res/values-en/dimens.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2009 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<resources>
+<!-- Cling -->
+ <dimen name="cling_title_text_size">22sp</dimen>
+ <dimen name="cling_text_size">16sp</dimen>
+ <dimen name="cling_alt_title_text_size">30sp</dimen>
+ <dimen name="cling_alt_text_size">16sp</dimen>
+ <dimen name="cling_hint_text_size">18sp</dimen>
+</resources>
diff --git a/res/values-es-rUS/strings.xml b/res/values-es-rUS/strings.xml
index c9a44a9..fd37c32 100644
--- a/res/values-es-rUS/strings.xml
+++ b/res/values-es-rUS/strings.xml
@@ -24,6 +24,8 @@
<string name="uid_name" msgid="7820867637514617527">"Aplicaciones básicas de Android"</string>
<string name="folder_name" msgid="7371454440695724752"></string>
<string name="wallpaper_instructions" msgid="563973358787555519">"Establecer como fondo de pantalla"</string>
+ <string name="image_load_fail" msgid="2821429163328561136">"No se pudo cargar la imagen."</string>
+ <string name="wallpaper_load_fail" msgid="1261270681127096352">"No se pudo cargar la imagen como fondo de pantalla."</string>
<plurals name="number_of_items_selected">
<item quantity="zero" msgid="7464587177007785408">"%1$d seleccionados"</item>
<item quantity="one" msgid="142482526010824029">"%1$d seleccionado"</item>
@@ -103,8 +105,6 @@
<string name="first_run_cling_create_screens_hint" msgid="6950729526680114157">"Crea más pantallas para aplicaciones y carpetas."</string>
<string name="workspace_cling_title" msgid="5626202359865825661">"Organiza tu espacio"</string>
<string name="workspace_cling_move_item" msgid="528201129978005352">"Mantén presionado el fondo para administrar el fondo de pantalla, los widgets y la configuración."</string>
- <string name="all_apps_cling_title" msgid="34929250753095858">"Elige algunas aplicaciones"</string>
- <string name="all_apps_cling_add_item" msgid="400866858451850784">"Para agregar una aplicación a tu pantalla principal, mantenla presionada."</string>
<string name="folder_cling_title" msgid="3894908818693254164">"Aquí tienes una carpeta"</string>
<string name="folder_cling_create_folder" msgid="6158215559475836131">"Para crear una carpeta como esta, mantén presionada una aplicación y luego muévela sobre otra."</string>
<string name="cling_dismiss" msgid="8962359497601507581">"Aceptar"</string>
diff --git a/res/values-es/strings.xml b/res/values-es/strings.xml
index 193e096..ad6b220 100644
--- a/res/values-es/strings.xml
+++ b/res/values-es/strings.xml
@@ -24,6 +24,8 @@
<string name="uid_name" msgid="7820867637514617527">"Aplicaciones básicas de Android"</string>
<string name="folder_name" msgid="7371454440695724752"></string>
<string name="wallpaper_instructions" msgid="563973358787555519">"Establecer fondo"</string>
+ <string name="image_load_fail" msgid="2821429163328561136">"No se ha podido cargar la imagen"</string>
+ <string name="wallpaper_load_fail" msgid="1261270681127096352">"No se ha podido cargar la imagen como fondo de pantalla"</string>
<plurals name="number_of_items_selected">
<item quantity="zero" msgid="7464587177007785408">"Seleccionados: %1$d"</item>
<item quantity="one" msgid="142482526010824029">"Seleccionados: %1$d"</item>
@@ -103,8 +105,6 @@
<string name="first_run_cling_create_screens_hint" msgid="6950729526680114157">"Crea más pantallas para aplicaciones y carpetas"</string>
<string name="workspace_cling_title" msgid="5626202359865825661">"Organiza tu espacio"</string>
<string name="workspace_cling_move_item" msgid="528201129978005352">"Mantén pulsado el fondo para gestionar el fondo de pantalla, los widgets y los ajustes."</string>
- <string name="all_apps_cling_title" msgid="34929250753095858">"Selecciona algunas aplicaciones"</string>
- <string name="all_apps_cling_add_item" msgid="400866858451850784">"Para añadir una aplicación a tu pantalla de inicio, solo tienes que mantenerla pulsada."</string>
<string name="folder_cling_title" msgid="3894908818693254164">"Esto es una carpeta"</string>
<string name="folder_cling_create_folder" msgid="6158215559475836131">"Para crear una carpeta como esta, mantén pulsada una aplicación y muévela sobre otra."</string>
<string name="cling_dismiss" msgid="8962359497601507581">"Aceptar"</string>
diff --git a/res/values-et-rEE/strings.xml b/res/values-et-rEE/strings.xml
index f026b08..ab4ad02 100644
--- a/res/values-et-rEE/strings.xml
+++ b/res/values-et-rEE/strings.xml
@@ -24,6 +24,8 @@
<string name="uid_name" msgid="7820867637514617527">"Androidi tuumrakendused"</string>
<string name="folder_name" msgid="7371454440695724752"></string>
<string name="wallpaper_instructions" msgid="563973358787555519">"Määra taustapilt"</string>
+ <string name="image_load_fail" msgid="2821429163328561136">"Kujutist ei õnnestunud laadida"</string>
+ <string name="wallpaper_load_fail" msgid="1261270681127096352">"Kujutist ei õnnestunud taustapildina laadida"</string>
<plurals name="number_of_items_selected">
<item quantity="zero" msgid="7464587177007785408">"Valitud on %1$d"</item>
<item quantity="one" msgid="142482526010824029">"Valitud on %1$d"</item>
@@ -103,8 +105,6 @@
<string name="first_run_cling_create_screens_hint" msgid="6950729526680114157">"Looge rakenduste ja kaustade jaoks rohkem ekraanikuvasid"</string>
<string name="workspace_cling_title" msgid="5626202359865825661">"Korraldage oma ruumi"</string>
<string name="workspace_cling_move_item" msgid="528201129978005352">"Taustapildi, vidinate ja seadete haldamiseks puudutage tausta ning hoidke seda all."</string>
- <string name="all_apps_cling_title" msgid="34929250753095858">"Valige mõned rakendused"</string>
- <string name="all_apps_cling_add_item" msgid="400866858451850784">"Rakenduse lisamiseks avaekraanile vajutage ja hoidke seda all."</string>
<string name="folder_cling_title" msgid="3894908818693254164">"Siin on kaust"</string>
<string name="folder_cling_create_folder" msgid="6158215559475836131">"Sarnase loomiseks vajutage ja hoidke rakendust all, seejärel viige see teise peale."</string>
<string name="cling_dismiss" msgid="8962359497601507581">"OK"</string>
diff --git a/res/values-fa/strings.xml b/res/values-fa/strings.xml
index 657b5db..2dd1bce 100644
--- a/res/values-fa/strings.xml
+++ b/res/values-fa/strings.xml
@@ -24,6 +24,8 @@
<string name="uid_name" msgid="7820867637514617527">"برنامههای Android Core"</string>
<string name="folder_name" msgid="7371454440695724752"></string>
<string name="wallpaper_instructions" msgid="563973358787555519">"تنظیم کاغذدیواری"</string>
+ <string name="image_load_fail" msgid="2821429163328561136">"بارگیری تصویر انجام نشد"</string>
+ <string name="wallpaper_load_fail" msgid="1261270681127096352">"بارگیری تصویر بهعنوان کاغذدیواری انجام نشد"</string>
<plurals name="number_of_items_selected">
<item quantity="zero" msgid="7464587177007785408">"%1$d انتخاب شد"</item>
<item quantity="one" msgid="142482526010824029">"%1$d انتخاب شد"</item>
@@ -103,8 +105,6 @@
<string name="first_run_cling_create_screens_hint" msgid="6950729526680114157">"صفحات بیشتری را برای برنامهها و پوشهها ایجاد کنید"</string>
<string name="workspace_cling_title" msgid="5626202359865825661">"فضای خود را سازماندهی کنید"</string>
<string name="workspace_cling_move_item" msgid="528201129978005352">"برای مدیریت کاغذدیواری، ابزارکها و تنظیمات، پسزمینه را لمس کرده و نگهدارید."</string>
- <string name="all_apps_cling_title" msgid="34929250753095858">"چند برنامه انتخاب کنید"</string>
- <string name="all_apps_cling_add_item" msgid="400866858451850784">"اگر میخواهید برنامهای را به صفحه اصلی خود اضافه کنید، آن را لمس کرده، نگهدارید."</string>
<string name="folder_cling_title" msgid="3894908818693254164">"اینجا یک پوشه است"</string>
<string name="folder_cling_create_folder" msgid="6158215559475836131">"برای ایجاد پوشهای مثل این، یک برنامه را لمس کرده و نگهدارید، سپس آن را روی برنامه دیگر بیاندازید."</string>
<string name="cling_dismiss" msgid="8962359497601507581">"تأیید"</string>
diff --git a/res/values-fi/strings.xml b/res/values-fi/strings.xml
index d327250..c5f478f 100644
--- a/res/values-fi/strings.xml
+++ b/res/values-fi/strings.xml
@@ -24,6 +24,8 @@
<string name="uid_name" msgid="7820867637514617527">"Androidin ydinsovellukset"</string>
<string name="folder_name" msgid="7371454440695724752"></string>
<string name="wallpaper_instructions" msgid="563973358787555519">"Aseta taustakuva"</string>
+ <string name="image_load_fail" msgid="2821429163328561136">"Kuvan lataus epäonnistui"</string>
+ <string name="wallpaper_load_fail" msgid="1261270681127096352">"Kuvaa ei voitu ladata taustakuvaksi"</string>
<plurals name="number_of_items_selected">
<item quantity="zero" msgid="7464587177007785408">"%1$d valittu"</item>
<item quantity="one" msgid="142482526010824029">"%1$d valittu"</item>
@@ -103,8 +105,6 @@
<string name="first_run_cling_create_screens_hint" msgid="6950729526680114157">"Luo lisää ruutuja sovelluksille ja kansioille"</string>
<string name="workspace_cling_title" msgid="5626202359865825661">"Järjestä tilasi"</string>
<string name="workspace_cling_move_item" msgid="528201129978005352">"Hallitse taustakuvaa, widgetejä ja asetuksia koskettamalla taustaa pitkään."</string>
- <string name="all_apps_cling_title" msgid="34929250753095858">"Valitse joitakin sovelluksia"</string>
- <string name="all_apps_cling_add_item" msgid="400866858451850784">"Voit lisätä sovelluksen aloitusruutuun koskettamalla sitä pitkään."</string>
<string name="folder_cling_title" msgid="3894908818693254164">"Tässä on kansio"</string>
<string name="folder_cling_create_folder" msgid="6158215559475836131">"Luo se seuraavasti: kosketa sovellusta pitkään ja siirrä se sitten toisen päälle."</string>
<string name="cling_dismiss" msgid="8962359497601507581">"OK"</string>
diff --git a/res/values-fr-rCA/strings.xml b/res/values-fr-rCA/strings.xml
index 9d8dbeb..49adaac 100644
--- a/res/values-fr-rCA/strings.xml
+++ b/res/values-fr-rCA/strings.xml
@@ -24,6 +24,8 @@
<string name="uid_name" msgid="7820867637514617527">"Applications de base Android"</string>
<string name="folder_name" msgid="7371454440695724752"></string>
<string name="wallpaper_instructions" msgid="563973358787555519">"Définir le fond d\'écran"</string>
+ <string name="image_load_fail" msgid="2821429163328561136">"Impossible de charger l\'image"</string>
+ <string name="wallpaper_load_fail" msgid="1261270681127096352">"Impossible de charger l\'image comme fond d\'écran"</string>
<plurals name="number_of_items_selected">
<item quantity="zero" msgid="7464587177007785408">"%1$d sélectionné"</item>
<item quantity="one" msgid="142482526010824029">"%1$d sélectionné"</item>
@@ -103,8 +105,6 @@
<string name="first_run_cling_create_screens_hint" msgid="6950729526680114157">"Créer plus d\'écrans pour les applications et les dossiers"</string>
<string name="workspace_cling_title" msgid="5626202359865825661">"Organiser son espace personnel"</string>
<string name="workspace_cling_move_item" msgid="528201129978005352">"Maintenez votre doigt sur l\'arrière-plan pour gérer les fonds d\'écran, les widgets et les paramètres."</string>
- <string name="all_apps_cling_title" msgid="34929250753095858">"Sélectionner des applications"</string>
- <string name="all_apps_cling_add_item" msgid="400866858451850784">"Pour ajouter une application à votre écran d\'accueil, maintenez votre doigt dessus."</string>
<string name="folder_cling_title" msgid="3894908818693254164">"Voici un dossier"</string>
<string name="folder_cling_create_folder" msgid="6158215559475836131">"Pour créer un dossier comme ça, maintenez votre doigt sur une application, puis déplacez-la sur une autre."</string>
<string name="cling_dismiss" msgid="8962359497601507581">"OK"</string>
diff --git a/res/values-fr/strings.xml b/res/values-fr/strings.xml
index b1b0a79..bb466ea 100644
--- a/res/values-fr/strings.xml
+++ b/res/values-fr/strings.xml
@@ -24,6 +24,8 @@
<string name="uid_name" msgid="7820867637514617527">"Applications de base Android"</string>
<string name="folder_name" msgid="7371454440695724752"></string>
<string name="wallpaper_instructions" msgid="563973358787555519">"Définir comme fond d\'écran"</string>
+ <string name="image_load_fail" msgid="2821429163328561136">"Impossible de charger l\'image."</string>
+ <string name="wallpaper_load_fail" msgid="1261270681127096352">"Impossible de charger l\'image comme fond d\'écran."</string>
<plurals name="number_of_items_selected">
<item quantity="zero" msgid="7464587177007785408">"%1$d fond d\'écran sélectionné"</item>
<item quantity="one" msgid="142482526010824029">"%1$d fond d\'écran sélectionné"</item>
@@ -103,8 +105,6 @@
<string name="first_run_cling_create_screens_hint" msgid="6950729526680114157">"Créez des écrans personnalisés pour vos applis et dossiers"</string>
<string name="workspace_cling_title" msgid="5626202359865825661">"Organisez votre espace"</string>
<string name="workspace_cling_move_item" msgid="528201129978005352">"Appuyez de manière prolongée sur l\'arrière-plan pour gérer les fonds d\'écran, les widgets et les paramètres."</string>
- <string name="all_apps_cling_title" msgid="34929250753095858">"Sélectionner des applications"</string>
- <string name="all_apps_cling_add_item" msgid="400866858451850784">"Pour ajouter une application à votre écran d\'accueil, appuyez dessus de manière prolongée."</string>
<string name="folder_cling_title" msgid="3894908818693254164">"Voici un dossier"</string>
<string name="folder_cling_create_folder" msgid="6158215559475836131">"Pour en créer un, appuyez de manière prolongée sur une application, puis déplacez-la vers une autre."</string>
<string name="cling_dismiss" msgid="8962359497601507581">"OK"</string>
diff --git a/res/values-hi/strings.xml b/res/values-hi/strings.xml
index eddd75c..b106078 100644
--- a/res/values-hi/strings.xml
+++ b/res/values-hi/strings.xml
@@ -24,6 +24,8 @@
<string name="uid_name" msgid="7820867637514617527">"Android के मुख्य एप्लिकेशन"</string>
<string name="folder_name" msgid="7371454440695724752"></string>
<string name="wallpaper_instructions" msgid="563973358787555519">"वॉलपेपर सेट करें"</string>
+ <string name="image_load_fail" msgid="2821429163328561136">"चित्र लोड नहीं किया जा सका"</string>
+ <string name="wallpaper_load_fail" msgid="1261270681127096352">"चित्र को वॉलपेपर के रूप में लोड नहीं किया जा सका"</string>
<plurals name="number_of_items_selected">
<item quantity="zero" msgid="7464587177007785408">"%1$d चयनित"</item>
<item quantity="one" msgid="142482526010824029">"%1$d चयनित"</item>
@@ -103,8 +105,6 @@
<string name="first_run_cling_create_screens_hint" msgid="6950729526680114157">"एप्लिकेशन और फ़ोल्डर के लिए और अधिक स्क्रीन बनाएं"</string>
<string name="workspace_cling_title" msgid="5626202359865825661">"अपने स्थान को व्यवस्थित करें"</string>
<string name="workspace_cling_move_item" msgid="528201129978005352">"वॉलपेपर, विजेट और सेटिंग प्रबंधित करने के लिए पृष्ठभूमि को स्पर्श करके रखें."</string>
- <string name="all_apps_cling_title" msgid="34929250753095858">"कुछ एप्लिकेशन चुनें"</string>
- <string name="all_apps_cling_add_item" msgid="400866858451850784">"किसी एप्लिकेशन को अपनी होम स्क्रीन से जोड़ने के लिए, उसे स्पर्श करके रखें."</string>
<string name="folder_cling_title" msgid="3894908818693254164">"यहां एक फ़ोल्डर है"</string>
<string name="folder_cling_create_folder" msgid="6158215559475836131">"इसके जैसा कोई एक बनाने के लिए, किसी एप्लिकेशन को स्पर्श करके रखें, फिर इसे किसी दूसरे पर ले जाएं."</string>
<string name="cling_dismiss" msgid="8962359497601507581">"ठीक"</string>
diff --git a/res/values-hr/strings.xml b/res/values-hr/strings.xml
index 783946d..9c7d38e 100644
--- a/res/values-hr/strings.xml
+++ b/res/values-hr/strings.xml
@@ -24,6 +24,8 @@
<string name="uid_name" msgid="7820867637514617527">"Matične aplikacije za Android"</string>
<string name="folder_name" msgid="7371454440695724752"></string>
<string name="wallpaper_instructions" msgid="563973358787555519">"Postavi pozadinsku sliku"</string>
+ <string name="image_load_fail" msgid="2821429163328561136">"Nije moguće učitati sliku"</string>
+ <string name="wallpaper_load_fail" msgid="1261270681127096352">"Nije moguće učitati sliku kao pozadinsku sliku"</string>
<plurals name="number_of_items_selected">
<item quantity="zero" msgid="7464587177007785408">"Odabrano: %1$d"</item>
<item quantity="one" msgid="142482526010824029">"Odabrano: %1$d"</item>
@@ -103,8 +105,6 @@
<string name="first_run_cling_create_screens_hint" msgid="6950729526680114157">"Izradite više zaslona za aplikacije i mape"</string>
<string name="workspace_cling_title" msgid="5626202359865825661">"Organizirajte svoj prostor"</string>
<string name="workspace_cling_move_item" msgid="528201129978005352">"Dodirnite i držite pozadinu da biste upravljali pozadinskom slikom, widgetima i postavkama."</string>
- <string name="all_apps_cling_title" msgid="34929250753095858">"Odaberite neke aplikacije"</string>
- <string name="all_apps_cling_add_item" msgid="400866858451850784">"Da biste dodali aplikaciju na početni zaslon, dodirnite je i zadržite."</string>
<string name="folder_cling_title" msgid="3894908818693254164">"Evo mape"</string>
<string name="folder_cling_create_folder" msgid="6158215559475836131">"Da biste izradili ovakvu mapu, dodirnite i držite aplikaciju pa je pomaknite preko druge aplikacije."</string>
<string name="cling_dismiss" msgid="8962359497601507581">"U redu"</string>
diff --git a/res/values-hu/strings.xml b/res/values-hu/strings.xml
index 8876652..89504dd 100644
--- a/res/values-hu/strings.xml
+++ b/res/values-hu/strings.xml
@@ -24,6 +24,8 @@
<string name="uid_name" msgid="7820867637514617527">"Alap Android-alkalmazások"</string>
<string name="folder_name" msgid="7371454440695724752"></string>
<string name="wallpaper_instructions" msgid="563973358787555519">"Háttérkép beállítása"</string>
+ <string name="image_load_fail" msgid="2821429163328561136">"A kép betöltése nem sikerült"</string>
+ <string name="wallpaper_load_fail" msgid="1261270681127096352">"A kép betöltése háttérképként nem sikerült"</string>
<plurals name="number_of_items_selected">
<item quantity="zero" msgid="7464587177007785408">"%1$d kiválasztva"</item>
<item quantity="one" msgid="142482526010824029">"%1$d kiválasztva"</item>
@@ -103,8 +105,6 @@
<string name="first_run_cling_create_screens_hint" msgid="6950729526680114157">"Hozzon létre további képernyőket az alkalmazásoknak és mappáknak"</string>
<string name="workspace_cling_title" msgid="5626202359865825661">"Munkaterület rendezése"</string>
<string name="workspace_cling_move_item" msgid="528201129978005352">"Érintse meg és tartsa lenyomva a hátteret a háttérkép, modulok és beállítások kezeléséhez."</string>
- <string name="all_apps_cling_title" msgid="34929250753095858">"Válasszon ki néhány alkalmazást"</string>
- <string name="all_apps_cling_add_item" msgid="400866858451850784">"Ha egy alkalmazást szeretne elhelyezni a kezdőképernyőn, érintse meg, és tartsa lenyomva."</string>
<string name="folder_cling_title" msgid="3894908818693254164">"Itt egy mappa"</string>
<string name="folder_cling_create_folder" msgid="6158215559475836131">"Mappa létrehozásához érintse meg és tartsa lenyomva az alkalmazást, majd húzza egy másik fölé."</string>
<string name="cling_dismiss" msgid="8962359497601507581">"OK"</string>
diff --git a/res/values-hy-rAM/strings.xml b/res/values-hy-rAM/strings.xml
index ab7388a..618193d 100644
--- a/res/values-hy-rAM/strings.xml
+++ b/res/values-hy-rAM/strings.xml
@@ -24,6 +24,8 @@
<string name="uid_name" msgid="7820867637514617527">"Android Core Apps"</string>
<string name="folder_name" msgid="7371454440695724752"></string>
<string name="wallpaper_instructions" msgid="563973358787555519">"Սահմանել պաստառը"</string>
+ <string name="image_load_fail" msgid="2821429163328561136">"Չհաջողվեց բեռնել նկարը"</string>
+ <string name="wallpaper_load_fail" msgid="1261270681127096352">"Չհաջողվեց նկարը սահմանել որպես պաստառ"</string>
<plurals name="number_of_items_selected">
<item quantity="zero" msgid="7464587177007785408">"%1$d ընտրված"</item>
<item quantity="one" msgid="142482526010824029">"%1$d ընտրված"</item>
@@ -103,8 +105,6 @@
<string name="first_run_cling_create_screens_hint" msgid="6950729526680114157">"Ստեղծեք նոր էկրաններ ծրագրերի և թղթապանակների համար"</string>
<string name="workspace_cling_title" msgid="5626202359865825661">"Կառավարեք ձեր տարածությունը"</string>
<string name="workspace_cling_move_item" msgid="528201129978005352">"Հպեք և պահեք հետնաշերտի վրա՝ պաստառները, վիջեթներն ու կարգավորումները կառավարելու համար:"</string>
- <string name="all_apps_cling_title" msgid="34929250753095858">"Ընտրեք ինչ-որ ծրագիր"</string>
- <string name="all_apps_cling_add_item" msgid="400866858451850784">"Ձեր հիմնական էկրանին ծրագիր ավելացնելու համար հպեք և պահեք այն:"</string>
<string name="folder_cling_title" msgid="3894908818693254164">"Ահա մի թղթապանակ"</string>
<string name="folder_cling_create_folder" msgid="6158215559475836131">"Նման թղթապանակ ստեղծելու համար հպեք և պահեք որևէ ծրագրի վրա, ապա տեղաշարժեք այն մեկ ուրիշ ծրագրի վրա:"</string>
<string name="cling_dismiss" msgid="8962359497601507581">"Լավ"</string>
diff --git a/res/values-in/strings.xml b/res/values-in/strings.xml
index e1e93f7..cb91c30 100644
--- a/res/values-in/strings.xml
+++ b/res/values-in/strings.xml
@@ -24,6 +24,8 @@
<string name="uid_name" msgid="7820867637514617527">"Aplikasi Inti Android"</string>
<string name="folder_name" msgid="7371454440695724752"></string>
<string name="wallpaper_instructions" msgid="563973358787555519">"Setel wallpaper"</string>
+ <string name="image_load_fail" msgid="2821429163328561136">"Tidak dapat memuat gambar"</string>
+ <string name="wallpaper_load_fail" msgid="1261270681127096352">"Tidak dapat memuat gambar sebagai wallpaper"</string>
<plurals name="number_of_items_selected">
<item quantity="zero" msgid="7464587177007785408">"%1$d dipilih"</item>
<item quantity="one" msgid="142482526010824029">"%1$d dipilih"</item>
@@ -103,8 +105,6 @@
<string name="first_run_cling_create_screens_hint" msgid="6950729526680114157">"Buat lebih banyak layar untuk aplikasi dan folder"</string>
<string name="workspace_cling_title" msgid="5626202359865825661">"Kelola ruang Anda"</string>
<string name="workspace_cling_move_item" msgid="528201129978005352">"Sentuh lama latar belakang untuk mengelola wallpaper, widget, dan setelan."</string>
- <string name="all_apps_cling_title" msgid="34929250753095858">"Pilih beberapa aplikasi"</string>
- <string name="all_apps_cling_add_item" msgid="400866858451850784">"Untuk menambah aplikasi ke layar Utama Anda, sentuh lama aplikasi tersebut."</string>
<string name="folder_cling_title" msgid="3894908818693254164">"Ini adalah folder"</string>
<string name="folder_cling_create_folder" msgid="6158215559475836131">"Untuk membuat seperti yang ini, sentuh lama aplikasi, lalu pindahkan ke atas aplikasi lain."</string>
<string name="cling_dismiss" msgid="8962359497601507581">"Oke"</string>
diff --git a/res/values-it/strings.xml b/res/values-it/strings.xml
index d5ada8f..ba40679 100644
--- a/res/values-it/strings.xml
+++ b/res/values-it/strings.xml
@@ -24,6 +24,8 @@
<string name="uid_name" msgid="7820867637514617527">"Applicazioni di base Android"</string>
<string name="folder_name" msgid="7371454440695724752"></string>
<string name="wallpaper_instructions" msgid="563973358787555519">"Imposta sfondo"</string>
+ <string name="image_load_fail" msgid="2821429163328561136">"Impossibile caricare l\'immagine"</string>
+ <string name="wallpaper_load_fail" msgid="1261270681127096352">"Impossibile caricare l\'immagine come sfondo"</string>
<plurals name="number_of_items_selected">
<item quantity="zero" msgid="7464587177007785408">"%1$d selezionati"</item>
<item quantity="one" msgid="142482526010824029">"%1$d selezionato"</item>
@@ -103,8 +105,6 @@
<string name="first_run_cling_create_screens_hint" msgid="6950729526680114157">"Creare più schermate per app e cartelle"</string>
<string name="workspace_cling_title" msgid="5626202359865825661">"Organizza il tuo spazio"</string>
<string name="workspace_cling_move_item" msgid="528201129978005352">"Tocca e tieni premuto lo sfondo per gestire sfondi, widget e impostazioni."</string>
- <string name="all_apps_cling_title" msgid="34929250753095858">"Scegli alcune applicazioni"</string>
- <string name="all_apps_cling_add_item" msgid="400866858451850784">"Per aggiungere un\'app alla schermata Home, tocca e tieni premuto."</string>
<string name="folder_cling_title" msgid="3894908818693254164">"Ecco una cartella"</string>
<string name="folder_cling_create_folder" msgid="6158215559475836131">"Per crearne una simile, tocca un\'app e tieni premuto, dopodiché spostala sopra un\'altra."</string>
<string name="cling_dismiss" msgid="8962359497601507581">"OK"</string>
diff --git a/res/values-iw/strings.xml b/res/values-iw/strings.xml
index 562ce4f..8d70a25 100644
--- a/res/values-iw/strings.xml
+++ b/res/values-iw/strings.xml
@@ -24,6 +24,8 @@
<string name="uid_name" msgid="7820867637514617527">"אפליקציות הליבה של Android"</string>
<string name="folder_name" msgid="7371454440695724752"></string>
<string name="wallpaper_instructions" msgid="563973358787555519">"בחר טפט"</string>
+ <string name="image_load_fail" msgid="2821429163328561136">"לא ניתן היה לטעון את התמונה"</string>
+ <string name="wallpaper_load_fail" msgid="1261270681127096352">"לא ניתן היה לטעון את התמונה כטפט"</string>
<plurals name="number_of_items_selected">
<item quantity="zero" msgid="7464587177007785408">"%1$d נבחרו"</item>
<item quantity="one" msgid="142482526010824029">"%1$d נבחרו"</item>
@@ -103,8 +105,6 @@
<string name="first_run_cling_create_screens_hint" msgid="6950729526680114157">"צור מסכים נוספים עבור אפליקציות ותיקיות"</string>
<string name="workspace_cling_title" msgid="5626202359865825661">"ארגן את אזור העבודה שלך"</string>
<string name="workspace_cling_move_item" msgid="528201129978005352">"גע נגיעה רציפה ברקע כדי לנהל את הטפט, רכיבי הווידג\'ט וההגדרות."</string>
- <string name="all_apps_cling_title" msgid="34929250753095858">"בחר כמה אפליקציות"</string>
- <string name="all_apps_cling_add_item" msgid="400866858451850784">"כדי להוסיף אפליקציה למסך דף הבית, גע בה נגיעה רציפה."</string>
<string name="folder_cling_title" msgid="3894908818693254164">"הנה תיקייה"</string>
<string name="folder_cling_create_folder" msgid="6158215559475836131">"כדי ליצור תיקייה כזו, גע נגיעה רציפה באפליקציה, ולאחר מכן גרור ושחרר אותו על-גבי אפליקציה אחרת."</string>
<string name="cling_dismiss" msgid="8962359497601507581">"אישור"</string>
diff --git a/res/values-ja/strings.xml b/res/values-ja/strings.xml
index 6e39c54..3c2b2f0 100644
--- a/res/values-ja/strings.xml
+++ b/res/values-ja/strings.xml
@@ -24,6 +24,8 @@
<string name="uid_name" msgid="7820867637514617527">"Android Core Apps"</string>
<string name="folder_name" msgid="7371454440695724752"></string>
<string name="wallpaper_instructions" msgid="563973358787555519">"壁紙を設定"</string>
+ <string name="image_load_fail" msgid="2821429163328561136">"画像を読み込めませんでした"</string>
+ <string name="wallpaper_load_fail" msgid="1261270681127096352">"画像を壁紙として読み込めませんでした"</string>
<plurals name="number_of_items_selected">
<item quantity="zero" msgid="7464587177007785408">"%1$d件選択済み"</item>
<item quantity="one" msgid="142482526010824029">"%1$d件選択済み"</item>
@@ -103,8 +105,6 @@
<string name="first_run_cling_create_screens_hint" msgid="6950729526680114157">"アプリとフォルダの画面をもっと作成します"</string>
<string name="workspace_cling_title" msgid="5626202359865825661">"スペースを整理"</string>
<string name="workspace_cling_move_item" msgid="528201129978005352">"壁紙、ウィジェット、設定を管理するには、背景を押し続けます。"</string>
- <string name="all_apps_cling_title" msgid="34929250753095858">"アプリの選択"</string>
- <string name="all_apps_cling_add_item" msgid="400866858451850784">"アプリをホーム画面に追加するにはアプリを押し続けます。"</string>
<string name="folder_cling_title" msgid="3894908818693254164">"これがフォルダです"</string>
<string name="folder_cling_create_folder" msgid="6158215559475836131">"これと同じフォルダを作成するには、アプリを押し続けてから別のアプリの上に移動します。"</string>
<string name="cling_dismiss" msgid="8962359497601507581">"OK"</string>
diff --git a/res/values-ka-rGE/strings.xml b/res/values-ka-rGE/strings.xml
index a2e3374..a68951a 100644
--- a/res/values-ka-rGE/strings.xml
+++ b/res/values-ka-rGE/strings.xml
@@ -24,6 +24,8 @@
<string name="uid_name" msgid="7820867637514617527">"Android-ის ბირთვის აპები"</string>
<string name="folder_name" msgid="7371454440695724752"></string>
<string name="wallpaper_instructions" msgid="563973358787555519">"ფონის დაყენება"</string>
+ <string name="image_load_fail" msgid="2821429163328561136">"სურათი ვერ ჩაიტვირთა."</string>
+ <string name="wallpaper_load_fail" msgid="1261270681127096352">"სურათი ფონად ვერ ჩაიტვირთა."</string>
<plurals name="number_of_items_selected">
<item quantity="zero" msgid="7464587177007785408">"არჩეულია %1$d"</item>
<item quantity="one" msgid="142482526010824029">"არჩეულია %1$d"</item>
@@ -103,8 +105,6 @@
<string name="first_run_cling_create_screens_hint" msgid="6950729526680114157">"აპებისა და საქაღალდეებისთვის კიდევ ერთი ეკრანის შექმნა"</string>
<string name="workspace_cling_title" msgid="5626202359865825661">"თქვენი სივრცის ორგანიზება"</string>
<string name="workspace_cling_move_item" msgid="528201129978005352">"თუ გსურთ ფონების, ვიჯეტების და პარამეტრების მართვა, შეეხეთ და არ აუშვათ ფონს."</string>
- <string name="all_apps_cling_title" msgid="34929250753095858">"აირჩიეთ რამდენიმე აპი"</string>
- <string name="all_apps_cling_add_item" msgid="400866858451850784">"აპის მთავარ ეკრანზე დასამატებლად შეეხეთ მის ხატულას და არ აუშვათ."</string>
<string name="folder_cling_title" msgid="3894908818693254164">"აი, საქაღალდე"</string>
<string name="folder_cling_create_folder" msgid="6158215559475836131">"ასეთის შესაქმნელად, შეეხეთ და დააყოვნეთ აპზე, ხოლო შემდეგ გადააჩოჩეთ შემდეგზე."</string>
<string name="cling_dismiss" msgid="8962359497601507581">"კარგი"</string>
diff --git a/res/values-km-rKH/strings.xml b/res/values-km-rKH/strings.xml
index 977b2dd..6799f77 100644
--- a/res/values-km-rKH/strings.xml
+++ b/res/values-km-rKH/strings.xml
@@ -24,6 +24,8 @@
<string name="uid_name" msgid="7820867637514617527">"កម្មវិធីសំខាន់ៗរបស់ Android"</string>
<string name="folder_name" msgid="7371454440695724752"></string>
<string name="wallpaper_instructions" msgid="563973358787555519">"កំណត់ផ្ទាំងរូបភាព"</string>
+ <string name="image_load_fail" msgid="2821429163328561136">"មិនអាចផ្ទុករូបភាព"</string>
+ <string name="wallpaper_load_fail" msgid="1261270681127096352">"មិនអាចផ្ទុករូបភាពជាផ្ទាំងរូបភាព"</string>
<plurals name="number_of_items_selected">
<item quantity="zero" msgid="7464587177007785408">"បានជ្រើស %1$d"</item>
<item quantity="one" msgid="142482526010824029">"បានជ្រើស %1$d"</item>
@@ -103,8 +105,6 @@
<string name="first_run_cling_create_screens_hint" msgid="6950729526680114157">"បង្កើតអេក្រង់ច្រើនសម្រាប់កម្មវិធី និងថតឯកសារ"</string>
<string name="workspace_cling_title" msgid="5626202359865825661">"រៀបចំចន្លោះរបស់អ្នក"</string>
<string name="workspace_cling_move_item" msgid="528201129978005352">"ប៉ះ & សង្កត់លើផ្ទៃខាងក្រោម ដើម្បីគ្រប់គ្រងផ្ទាំងរូបភាព, ធាតុក្រាហ្វិក និងការកំណត់។"</string>
- <string name="all_apps_cling_title" msgid="34929250753095858">"ជ្រើសកម្មវិធីមួយចំនួន"</string>
- <string name="all_apps_cling_add_item" msgid="400866858451850784">"ប៉ះ & សង្កត់វា ដើម្បីបន្ថែមកម្មវិធីទៅអេក្រង់ដើមរបស់អ្នក"</string>
<string name="folder_cling_title" msgid="3894908818693254164">"នេះជាថត"</string>
<string name="folder_cling_create_folder" msgid="6158215559475836131">"ដើម្បីបង្កើតមួយដូចនេះ ប៉ះ & សង្កត់លើកម្មវិធី បន្ទាប់មកផ្លាស់ទីវាទៅលើធាតុមួយផ្សេងទៀត។"</string>
<string name="cling_dismiss" msgid="8962359497601507581">"យល់ព្រម"</string>
diff --git a/res/values-ko/strings.xml b/res/values-ko/strings.xml
index 31c2d69..82193d2 100644
--- a/res/values-ko/strings.xml
+++ b/res/values-ko/strings.xml
@@ -24,6 +24,8 @@
<string name="uid_name" msgid="7820867637514617527">"Android 핵심 앱"</string>
<string name="folder_name" msgid="7371454440695724752"></string>
<string name="wallpaper_instructions" msgid="563973358787555519">"배경화면 설정"</string>
+ <string name="image_load_fail" msgid="2821429163328561136">"이미지를 로드할 수 없습니다."</string>
+ <string name="wallpaper_load_fail" msgid="1261270681127096352">"이미지를 배경화면으로 로드할 수 없습니다."</string>
<plurals name="number_of_items_selected">
<item quantity="zero" msgid="7464587177007785408">"%1$d개 선택됨"</item>
<item quantity="one" msgid="142482526010824029">"%1$d개 선택됨"</item>
@@ -103,8 +105,6 @@
<string name="first_run_cling_create_screens_hint" msgid="6950729526680114157">"앱 및 폴더를 표시할 화면 더 만들기"</string>
<string name="workspace_cling_title" msgid="5626202359865825661">"공간 관리하기"</string>
<string name="workspace_cling_move_item" msgid="528201129978005352">"배경화면, 위젯, 설정을 관리하려면 백그라운드를 길게 터치합니다."</string>
- <string name="all_apps_cling_title" msgid="34929250753095858">"앱 선택하기"</string>
- <string name="all_apps_cling_add_item" msgid="400866858451850784">"홈 화면에 앱을 추가하려면 길게 터치합니다."</string>
<string name="folder_cling_title" msgid="3894908818693254164">"폴더"</string>
<string name="folder_cling_create_folder" msgid="6158215559475836131">"폴더를 만들려면 앱을 길게 터치한 다음 다른 앱 위에 올려 놓으세요."</string>
<string name="cling_dismiss" msgid="8962359497601507581">"확인"</string>
diff --git a/res/values-land/dimens.xml b/res/values-land/dimens.xml
index 5961b19..07d9279 100644
--- a/res/values-land/dimens.xml
+++ b/res/values-land/dimens.xml
@@ -19,11 +19,6 @@
<dimen name="toolbar_button_vertical_padding">8dip</dimen>
<dimen name="toolbar_button_horizontal_padding">0dip</dimen>
-<!-- Workspace -->
- <!-- We really want the page spacing to be the max of either the button bar
- height or the qsb bar height -->
- <dimen name="workspace_page_spacing">-1dp</dimen>
-
<!-- AppsCustomize -->
<dimen name="apps_customize_tab_bar_height">42dp</dimen>
<integer name="apps_customize_widget_cell_count_x">3</integer>
diff --git a/res/values-lo-rLA/strings.xml b/res/values-lo-rLA/strings.xml
index e3a95dd..fac96e4 100644
--- a/res/values-lo-rLA/strings.xml
+++ b/res/values-lo-rLA/strings.xml
@@ -24,6 +24,8 @@
<string name="uid_name" msgid="7820867637514617527">"ແອັບພລິເຄຊັນຫຼັກຂອງ Android"</string>
<string name="folder_name" msgid="7371454440695724752"></string>
<string name="wallpaper_instructions" msgid="563973358787555519">"ຕັ້ງເປັນພາບພື້ນຫຼັງ"</string>
+ <string name="image_load_fail" msgid="2821429163328561136">"ບໍ່ສາມາດໂຫຼດຮູບພາບໄດ້"</string>
+ <string name="wallpaper_load_fail" msgid="1261270681127096352">"ບໍ່ສາມາດໂຫຼດຮູບພາບເປັນຮູບພື້ນຫຼັງໄດ້"</string>
<plurals name="number_of_items_selected">
<item quantity="zero" msgid="7464587177007785408">"ເລືອກ %1$d ລາຍການແລ້ວ"</item>
<item quantity="one" msgid="142482526010824029">"ເລືອກ %1$d ລາຍການແລ້ວ"</item>
@@ -103,8 +105,6 @@
<string name="first_run_cling_create_screens_hint" msgid="6950729526680114157">"ສ້າງຈໍເພີ່ມເຕີມສຳລັບແອັບຯ ແລະໂຟນເດີ"</string>
<string name="workspace_cling_title" msgid="5626202359865825661">"ຈັດການພື້ນທີ່ຂອງທ່ານ"</string>
<string name="workspace_cling_move_item" msgid="528201129978005352">"ແຕະຄ້າງໄວ້ທີ່ພາບພື້ນຫຼັງເພື່ອຈັດການພາບພື້ນຫຼັງ, ວິດເຈັດແລະການຕັ້ງຄ່າ."</string>
- <string name="all_apps_cling_title" msgid="34929250753095858">"ເລືອກແອັບຯ"</string>
- <string name="all_apps_cling_add_item" msgid="400866858451850784">"ເພື່ອເພີ່ມແອັບຯໃສ່ໜ້າຈໍຫຼັກຂອງທ່ານ, ໃຫ້ແຕະຄ້າງໄວ້."</string>
<string name="folder_cling_title" msgid="3894908818693254164">"ນີ້ແມ່ນໂຟນເດີ່"</string>
<string name="folder_cling_create_folder" msgid="6158215559475836131">"ເພື່ອສ້າງອັນໃໝ່ແບບນີ້, ແຕະຄ້າງໄວ້ທີ່ແອັບຯ ແລ້ວຍ້າຍມັນໄປຫາໂຕອື່ນ."</string>
<string name="cling_dismiss" msgid="8962359497601507581">"ຕົກລົງ"</string>
diff --git a/res/values-lt/strings.xml b/res/values-lt/strings.xml
index 80d4412..1d53bf1 100644
--- a/res/values-lt/strings.xml
+++ b/res/values-lt/strings.xml
@@ -24,6 +24,8 @@
<string name="uid_name" msgid="7820867637514617527">"Pagrindinės „Android“ programos"</string>
<string name="folder_name" msgid="7371454440695724752"></string>
<string name="wallpaper_instructions" msgid="563973358787555519">"Nustatyti ekrano foną"</string>
+ <string name="image_load_fail" msgid="2821429163328561136">"Nepavyko įkelti vaizdo"</string>
+ <string name="wallpaper_load_fail" msgid="1261270681127096352">"Nepavyko įkelti vaizdo kaip ekrano fono"</string>
<plurals name="number_of_items_selected">
<item quantity="zero" msgid="7464587177007785408">"Pasirinkta: %1$d"</item>
<item quantity="one" msgid="142482526010824029">"Pasirinkta: %1$d"</item>
@@ -103,8 +105,6 @@
<string name="first_run_cling_create_screens_hint" msgid="6950729526680114157">"Sukurkite daugiau programų ir aplankų ekrano kopijų"</string>
<string name="workspace_cling_title" msgid="5626202359865825661">"Tvarkykite savo vietą"</string>
<string name="workspace_cling_move_item" msgid="528201129978005352">"Palieskite ir laikykite foną, jei norite tvarkyti ekrano foną, valdiklius ir nustatymus."</string>
- <string name="all_apps_cling_title" msgid="34929250753095858">"Pasirinkite kelias programas"</string>
- <string name="all_apps_cling_add_item" msgid="400866858451850784">"Jei norite prie pagrindinio ekrano pridėti programą, palieskite ją ir laikykite."</string>
<string name="folder_cling_title" msgid="3894908818693254164">"Štai aplankas"</string>
<string name="folder_cling_create_folder" msgid="6158215559475836131">"Kad sukurtumėte tokį patį, palieskite ir laikykite programą, tada perkelkite ją virš kitos programos."</string>
<string name="cling_dismiss" msgid="8962359497601507581">"Gerai"</string>
diff --git a/res/values-lv/strings.xml b/res/values-lv/strings.xml
index b70f5dc..856439b 100644
--- a/res/values-lv/strings.xml
+++ b/res/values-lv/strings.xml
@@ -24,6 +24,8 @@
<string name="uid_name" msgid="7820867637514617527">"Android pamatlietotnes"</string>
<string name="folder_name" msgid="7371454440695724752"></string>
<string name="wallpaper_instructions" msgid="563973358787555519">"Iestatīt fona tapeti"</string>
+ <string name="image_load_fail" msgid="2821429163328561136">"Nevarēja ielādēt attēlu."</string>
+ <string name="wallpaper_load_fail" msgid="1261270681127096352">"Nevarēja ielādēt attēlu kā fona tapeti."</string>
<plurals name="number_of_items_selected">
<item quantity="zero" msgid="7464587177007785408">"Atlasīti: %1$d"</item>
<item quantity="one" msgid="142482526010824029">"Atlasīti: %1$d"</item>
@@ -103,8 +105,6 @@
<string name="first_run_cling_create_screens_hint" msgid="6950729526680114157">"Izveidojiet vairāk ekrānu lietotnēm un mapēm."</string>
<string name="workspace_cling_title" msgid="5626202359865825661">"Kārtojiet savu darbvietu"</string>
<string name="workspace_cling_move_item" msgid="528201129978005352">"Pieskarieties fonam un turiet to, lai pārvaldītu fona tapeti, logrīkus un iestatījumus."</string>
- <string name="all_apps_cling_title" msgid="34929250753095858">"Izvēlieties dažas lietotnes"</string>
- <string name="all_apps_cling_add_item" msgid="400866858451850784">"Lai sākuma ekrānam pievienotu lietotni, pieskarieties tai un turiet to."</string>
<string name="folder_cling_title" msgid="3894908818693254164">"Lūk, mape!"</string>
<string name="folder_cling_create_folder" msgid="6158215559475836131">"Lai izveidotu tādu pašu, pieskarieties lietotnei un turiet to, pēc tam pārvietojiet to virs citas lietotnes."</string>
<string name="cling_dismiss" msgid="8962359497601507581">"Labi"</string>
diff --git a/res/values-mn-rMN/strings.xml b/res/values-mn-rMN/strings.xml
index 7cf7a9c..20af05e 100644
--- a/res/values-mn-rMN/strings.xml
+++ b/res/values-mn-rMN/strings.xml
@@ -24,6 +24,8 @@
<string name="uid_name" msgid="7820867637514617527">"Андройд үндсэн апп"</string>
<string name="folder_name" msgid="7371454440695724752"></string>
<string name="wallpaper_instructions" msgid="563973358787555519">"Ханын зургийг тохируулах"</string>
+ <string name="image_load_fail" msgid="2821429163328561136">"Зургийг ачааллаж чадсангүй"</string>
+ <string name="wallpaper_load_fail" msgid="1261270681127096352">"Зургийг ханын зураг болгож ачааллаж чадсангүй"</string>
<plurals name="number_of_items_selected">
<item quantity="zero" msgid="7464587177007785408">"%1$d сонгогдсон"</item>
<item quantity="one" msgid="142482526010824029">"%1$d сонгогдсон"</item>
@@ -103,8 +105,6 @@
<string name="first_run_cling_create_screens_hint" msgid="6950729526680114157">"Апп болон фолдеруудад зориулан өөр дэлгэцүүд үүсгээрэй"</string>
<string name="workspace_cling_title" msgid="5626202359865825661">"Өөрийнхөө зайг тохируулаарай"</string>
<string name="workspace_cling_move_item" msgid="528201129978005352">"Арын дэвсгэр дээр хүрээд & дарснаар ханын зураг, виджет болон тохиргоог өөрчилж болно."</string>
- <string name="all_apps_cling_title" msgid="34929250753095858">"Апп сонгоно уу"</string>
- <string name="all_apps_cling_add_item" msgid="400866858451850784">"Нүүр дэлгэцэнд апп нэмэх бол хүрээд барина уу."</string>
<string name="folder_cling_title" msgid="3894908818693254164">"Фолдер энд байна"</string>
<string name="folder_cling_create_folder" msgid="6158215559475836131">"Үүнтэй адилханыг үүсгэхийн тулд апп дээр хүрч & бариад нөгөөхийн дээр зөөнө үү."</string>
<string name="cling_dismiss" msgid="8962359497601507581">"Тийм"</string>
diff --git a/res/values-ms-rMY/strings.xml b/res/values-ms-rMY/strings.xml
index 4ee3545..dca483d 100644
--- a/res/values-ms-rMY/strings.xml
+++ b/res/values-ms-rMY/strings.xml
@@ -24,6 +24,8 @@
<string name="uid_name" msgid="7820867637514617527">"Apl Teras Android"</string>
<string name="folder_name" msgid="7371454440695724752"></string>
<string name="wallpaper_instructions" msgid="563973358787555519">"Tetapkan kertas dinding"</string>
+ <string name="image_load_fail" msgid="2821429163328561136">"Tidak dapat memuatkan imej"</string>
+ <string name="wallpaper_load_fail" msgid="1261270681127096352">"Tidak dapat memuatkan imej sebagai kertas dinding"</string>
<plurals name="number_of_items_selected">
<item quantity="zero" msgid="7464587177007785408">"%1$d dipilih"</item>
<item quantity="one" msgid="142482526010824029">"%1$d dipilih"</item>
@@ -103,8 +105,6 @@
<string name="first_run_cling_create_screens_hint" msgid="6950729526680114157">"Buat lebih banyak skrin untuk apl dan folder"</string>
<string name="workspace_cling_title" msgid="5626202359865825661">"Susun ruang anda"</string>
<string name="workspace_cling_move_item" msgid="528201129978005352">"Sentuh & tahan latar belakang untuk mengurus kertas dinding, widget dan tetapan."</string>
- <string name="all_apps_cling_title" msgid="34929250753095858">"Pilih beberapa apl"</string>
- <string name="all_apps_cling_add_item" msgid="400866858451850784">"Untuk menambahkan apl pada skrin Laman Utama anda, sentuh & tahan apl."</string>
<string name="folder_cling_title" msgid="3894908818693254164">"Ini ada folder"</string>
<string name="folder_cling_create_folder" msgid="6158215559475836131">"Untuk membuat satu folder seperti ini, sentuh & tahan apl, kemudian alihkan ke atas folder lain."</string>
<string name="cling_dismiss" msgid="8962359497601507581">"OK"</string>
diff --git a/res/values-nb/strings.xml b/res/values-nb/strings.xml
index ce50754..9cb161f 100644
--- a/res/values-nb/strings.xml
+++ b/res/values-nb/strings.xml
@@ -24,6 +24,8 @@
<string name="uid_name" msgid="7820867637514617527">"Kjerneapper for Android"</string>
<string name="folder_name" msgid="7371454440695724752"></string>
<string name="wallpaper_instructions" msgid="563973358787555519">"Angi bakgrunn"</string>
+ <string name="image_load_fail" msgid="2821429163328561136">"Kunne ikke laste inn bildet"</string>
+ <string name="wallpaper_load_fail" msgid="1261270681127096352">"Kunne ikke laste inn bildet som bakgrunn"</string>
<plurals name="number_of_items_selected">
<item quantity="zero" msgid="7464587177007785408">"%1$d valgt"</item>
<item quantity="one" msgid="142482526010824029">"%1$d valgt"</item>
@@ -103,8 +105,6 @@
<string name="first_run_cling_create_screens_hint" msgid="6950729526680114157">"Opprett flere sider for apper og mapper"</string>
<string name="workspace_cling_title" msgid="5626202359865825661">"Organiser plassen din"</string>
<string name="workspace_cling_move_item" msgid="528201129978005352">"Trykk og hold på bakgrunnen for å administrere bakgrunnen, moduler og innstillinger."</string>
- <string name="all_apps_cling_title" msgid="34929250753095858">"Velg noen apper"</string>
- <string name="all_apps_cling_add_item" msgid="400866858451850784">"Trykk og hold på en app for å legge den til på startsiden."</string>
<string name="folder_cling_title" msgid="3894908818693254164">"Dette er en mappe"</string>
<string name="folder_cling_create_folder" msgid="6158215559475836131">"For å opprette en som denne, trykker og holder du på en app og flytter den over en annen."</string>
<string name="cling_dismiss" msgid="8962359497601507581">"OK"</string>
diff --git a/res/values-nl/strings.xml b/res/values-nl/strings.xml
index e2a2a07..e28b395 100644
--- a/res/values-nl/strings.xml
+++ b/res/values-nl/strings.xml
@@ -24,6 +24,8 @@
<string name="uid_name" msgid="7820867637514617527">"Android-kernapps"</string>
<string name="folder_name" msgid="7371454440695724752"></string>
<string name="wallpaper_instructions" msgid="563973358787555519">"Achtergrond instellen"</string>
+ <string name="image_load_fail" msgid="2821429163328561136">"Kan afbeelding niet laden"</string>
+ <string name="wallpaper_load_fail" msgid="1261270681127096352">"Kan afbeelding niet laden als achtergrond"</string>
<plurals name="number_of_items_selected">
<item quantity="zero" msgid="7464587177007785408">"%1$d geselecteerd"</item>
<item quantity="one" msgid="142482526010824029">"%1$d geselecteerd"</item>
@@ -103,8 +105,6 @@
<string name="first_run_cling_create_screens_hint" msgid="6950729526680114157">"Meer schermen maken voor apps en mappen"</string>
<string name="workspace_cling_title" msgid="5626202359865825661">"Uw ruimte indelen"</string>
<string name="workspace_cling_move_item" msgid="528201129978005352">"Blijf de achtergrond aanraken om de achtergrond, widgets en instellingen te beheren."</string>
- <string name="all_apps_cling_title" msgid="34929250753095858">"Selecteer een aantal apps"</string>
- <string name="all_apps_cling_add_item" msgid="400866858451850784">"Als u een app wilt toevoegen aan het startscherm, blijft u de app aanraken."</string>
<string name="folder_cling_title" msgid="3894908818693254164">"Dit is een map"</string>
<string name="folder_cling_create_folder" msgid="6158215559475836131">"Als u een map zoals deze wilt maken, blijft u een app aanraken en schuift u deze boven op een andere app."</string>
<string name="cling_dismiss" msgid="8962359497601507581">"OK"</string>
diff --git a/res/values-pl/strings.xml b/res/values-pl/strings.xml
index b629f3d..ec72374 100644
--- a/res/values-pl/strings.xml
+++ b/res/values-pl/strings.xml
@@ -24,6 +24,8 @@
<string name="uid_name" msgid="7820867637514617527">"Główne aplikacje Androida"</string>
<string name="folder_name" msgid="7371454440695724752"></string>
<string name="wallpaper_instructions" msgid="563973358787555519">"Ustaw tapetę"</string>
+ <string name="image_load_fail" msgid="2821429163328561136">"Nie udało się załadować obrazu"</string>
+ <string name="wallpaper_load_fail" msgid="1261270681127096352">"Nie udało się załadować obrazu jako tapety"</string>
<plurals name="number_of_items_selected">
<item quantity="zero" msgid="7464587177007785408">"Wybrane: %1$d"</item>
<item quantity="one" msgid="142482526010824029">"Wybrane: %1$d"</item>
@@ -103,8 +105,6 @@
<string name="first_run_cling_create_screens_hint" msgid="6950729526680114157">"Dodaj więcej ekranów na aplikacje i foldery"</string>
<string name="workspace_cling_title" msgid="5626202359865825661">"Uporządkuj obszar roboczy"</string>
<string name="workspace_cling_move_item" msgid="528201129978005352">"Kliknij i przytrzymaj tło, by zmienić tapetę, widżety lub ustawienia."</string>
- <string name="all_apps_cling_title" msgid="34929250753095858">"Wybierz kilka aplikacji"</string>
- <string name="all_apps_cling_add_item" msgid="400866858451850784">"Aby dodać aplikację na ekran główny, dotknij i przytrzymaj jej ikonę."</string>
<string name="folder_cling_title" msgid="3894908818693254164">"Tu jest folder"</string>
<string name="folder_cling_create_folder" msgid="6158215559475836131">"Aby utworzyć taki sam, kliknij i przytrzymaj aplikację, a następnie przenieś ją na następną."</string>
<string name="cling_dismiss" msgid="8962359497601507581">"OK"</string>
diff --git a/res/values-port/dimens.xml b/res/values-port/dimens.xml
index 7194a2a..7753ab3 100644
--- a/res/values-port/dimens.xml
+++ b/res/values-port/dimens.xml
@@ -15,9 +15,6 @@
-->
<resources>
-<!-- Workspace -->
- <dimen name="workspace_page_spacing">-1dp</dimen>
-
<!-- AppsCustomize -->
<integer name="apps_customize_cling_focused_x">1</integer>
<integer name="apps_customize_cling_focused_y">1</integer>
diff --git a/res/values-pt-rPT/strings.xml b/res/values-pt-rPT/strings.xml
index 1ef3982..510468e 100644
--- a/res/values-pt-rPT/strings.xml
+++ b/res/values-pt-rPT/strings.xml
@@ -24,6 +24,8 @@
<string name="uid_name" msgid="7820867637514617527">"Aplicações principais do Android"</string>
<string name="folder_name" msgid="7371454440695724752"></string>
<string name="wallpaper_instructions" msgid="563973358787555519">"Definir imagem fundo"</string>
+ <string name="image_load_fail" msgid="2821429163328561136">"Não foi possível carregar a imagem"</string>
+ <string name="wallpaper_load_fail" msgid="1261270681127096352">"Não foi possível carregar a imagem como imagem de fundo"</string>
<plurals name="number_of_items_selected">
<item quantity="zero" msgid="7464587177007785408">"%1$d selecionado(s)"</item>
<item quantity="one" msgid="142482526010824029">"%1$d selecionado(s)"</item>
@@ -103,8 +105,6 @@
<string name="first_run_cling_create_screens_hint" msgid="6950729526680114157">"Crie mais ecrãs para aplicações e pastas"</string>
<string name="workspace_cling_title" msgid="5626202359865825661">"Organizar o seu espaço"</string>
<string name="workspace_cling_move_item" msgid="528201129978005352">"Toque sem soltar no fundo para gerir a imagem de fundo, os widgets e as definições."</string>
- <string name="all_apps_cling_title" msgid="34929250753095858">"Escolher algumas aplicações"</string>
- <string name="all_apps_cling_add_item" msgid="400866858451850784">"Para adicionar uma aplicação ao Ecrã principal, toque na mesma sem soltar."</string>
<string name="folder_cling_title" msgid="3894908818693254164">"Eis uma pasta"</string>
<string name="folder_cling_create_folder" msgid="6158215559475836131">"Para criar uma pasta, toque sem soltar numa aplicação e arraste-a para cima de outra aplicação."</string>
<string name="cling_dismiss" msgid="8962359497601507581">"OK"</string>
diff --git a/res/values-pt/strings.xml b/res/values-pt/strings.xml
index 4d40388..1ac9f5b 100644
--- a/res/values-pt/strings.xml
+++ b/res/values-pt/strings.xml
@@ -24,6 +24,8 @@
<string name="uid_name" msgid="7820867637514617527">"Principais aplicativos do Android"</string>
<string name="folder_name" msgid="7371454440695724752"></string>
<string name="wallpaper_instructions" msgid="563973358787555519">"Definir plano de fundo"</string>
+ <string name="image_load_fail" msgid="2821429163328561136">"Não foi possível carregar a imagem"</string>
+ <string name="wallpaper_load_fail" msgid="1261270681127096352">"Não foi possível carregar a imagem como plano de fundo"</string>
<plurals name="number_of_items_selected">
<item quantity="zero" msgid="7464587177007785408">"%1$d selecionados"</item>
<item quantity="one" msgid="142482526010824029">"%1$d selecionados"</item>
@@ -103,8 +105,6 @@
<string name="first_run_cling_create_screens_hint" msgid="6950729526680114157">"Crie mais telas para aplicativos e pastas"</string>
<string name="workspace_cling_title" msgid="5626202359865825661">"Organize seu espaço"</string>
<string name="workspace_cling_move_item" msgid="528201129978005352">"Toque e mantenha pressionada a tela de fundo para gerenciar o plano de fundo, os widgets e as configurações."</string>
- <string name="all_apps_cling_title" msgid="34929250753095858">"Escolha alguns aplicativos"</string>
- <string name="all_apps_cling_add_item" msgid="400866858451850784">"Para adicionar um aplicativo a sua tela inicial, toque e mantenha-o pressionado."</string>
<string name="folder_cling_title" msgid="3894908818693254164">"Aqui está uma pasta"</string>
<string name="folder_cling_create_folder" msgid="6158215559475836131">"Para criar uma pasta como esta, mantenha pressionado um aplicativo e mova-o para cima de outro."</string>
<string name="cling_dismiss" msgid="8962359497601507581">"Ok"</string>
diff --git a/res/values-rm/strings.xml b/res/values-rm/strings.xml
index ddcf404..2015158 100644
--- a/res/values-rm/strings.xml
+++ b/res/values-rm/strings.xml
@@ -28,6 +28,10 @@
<string name="folder_name" msgid="7371454440695724752"></string>
<!-- no translation found for wallpaper_instructions (563973358787555519) -->
<skip />
+ <!-- no translation found for image_load_fail (2821429163328561136) -->
+ <skip />
+ <!-- no translation found for wallpaper_load_fail (1261270681127096352) -->
+ <skip />
<!-- no translation found for number_of_items_selected:zero (7464587177007785408) -->
<!-- no translation found for number_of_items_selected:one (142482526010824029) -->
<!-- no translation found for number_of_items_selected:other (1418352074806573570) -->
@@ -177,10 +181,6 @@
<skip />
<!-- no translation found for workspace_cling_move_item (528201129978005352) -->
<skip />
- <!-- no translation found for all_apps_cling_title (34929250753095858) -->
- <skip />
- <!-- no translation found for all_apps_cling_add_item (400866858451850784) -->
- <skip />
<!-- no translation found for folder_cling_title (3894908818693254164) -->
<skip />
<!-- no translation found for folder_cling_create_folder (6158215559475836131) -->
diff --git a/res/values-ro/strings.xml b/res/values-ro/strings.xml
index 78d9da4..85023c3 100644
--- a/res/values-ro/strings.xml
+++ b/res/values-ro/strings.xml
@@ -24,6 +24,8 @@
<string name="uid_name" msgid="7820867637514617527">"Android Core Apps"</string>
<string name="folder_name" msgid="7371454440695724752"></string>
<string name="wallpaper_instructions" msgid="563973358787555519">"Setați imaginea de fundal"</string>
+ <string name="image_load_fail" msgid="2821429163328561136">"Nu s-a putut încărca imaginea"</string>
+ <string name="wallpaper_load_fail" msgid="1261270681127096352">"Nu s-a putut încărca imaginea ca fundal"</string>
<plurals name="number_of_items_selected">
<item quantity="zero" msgid="7464587177007785408">"%1$d selectate"</item>
<item quantity="one" msgid="142482526010824029">"%1$d selectat"</item>
@@ -103,8 +105,6 @@
<string name="first_run_cling_create_screens_hint" msgid="6950729526680114157">"Creați mai multe ecrane pentru aplicații și dosare"</string>
<string name="workspace_cling_title" msgid="5626202359865825661">"Organizați-vă spațiul"</string>
<string name="workspace_cling_move_item" msgid="528201129978005352">"Atingeți lung fundalul pentru a gestiona imaginea de fundal, widgeturile și setările."</string>
- <string name="all_apps_cling_title" msgid="34929250753095858">"Alegeți unele aplicații"</string>
- <string name="all_apps_cling_add_item" msgid="400866858451850784">"Atingeți lung o aplicație pentru a o adăuga pe ecranul de pornire."</string>
<string name="folder_cling_title" msgid="3894908818693254164">"Iată un dosar"</string>
<string name="folder_cling_create_folder" msgid="6158215559475836131">"Pentru a crea un dosar similar, atingeți și țineți degetul pe o aplicație, apoi mutați-o deasupra alteia."</string>
<string name="cling_dismiss" msgid="8962359497601507581">"OK"</string>
diff --git a/res/values-ru/strings.xml b/res/values-ru/strings.xml
index 06fbd26..c8a2287 100644
--- a/res/values-ru/strings.xml
+++ b/res/values-ru/strings.xml
@@ -24,6 +24,8 @@
<string name="uid_name" msgid="7820867637514617527">"Основные приложения Android"</string>
<string name="folder_name" msgid="7371454440695724752"></string>
<string name="wallpaper_instructions" msgid="563973358787555519">"Установить как обои"</string>
+ <string name="image_load_fail" msgid="2821429163328561136">"Не удалось загрузить изображение"</string>
+ <string name="wallpaper_load_fail" msgid="1261270681127096352">"Не удалось загрузить изображение"</string>
<plurals name="number_of_items_selected">
<item quantity="zero" msgid="7464587177007785408">"Выбрано: %1$d"</item>
<item quantity="one" msgid="142482526010824029">"Выбрано: %1$d"</item>
@@ -103,8 +105,6 @@
<string name="first_run_cling_create_screens_hint" msgid="6950729526680114157">"Создание дополнительных экранов для приложений и папок"</string>
<string name="workspace_cling_title" msgid="5626202359865825661">"Организация рабочего пространства"</string>
<string name="workspace_cling_move_item" msgid="528201129978005352">"Чтобы перейти к управлению обоями, виджетами и настройками, нажмите на фоновое изображение и удерживайте его."</string>
- <string name="all_apps_cling_title" msgid="34929250753095858">"Выберите приложения"</string>
- <string name="all_apps_cling_add_item" msgid="400866858451850784">"Чтобы добавить приложение на главный экран, нажмите на значок и удерживайте его."</string>
<string name="folder_cling_title" msgid="3894908818693254164">"Это папка"</string>
<string name="folder_cling_create_folder" msgid="6158215559475836131">"Чтобы создать папку, нажмите и удерживайте значок приложения, а затем перетащите его на другой значок."</string>
<string name="cling_dismiss" msgid="8962359497601507581">"ОК"</string>
diff --git a/res/values-sk/strings.xml b/res/values-sk/strings.xml
index 29de526..77fd07d 100644
--- a/res/values-sk/strings.xml
+++ b/res/values-sk/strings.xml
@@ -24,6 +24,8 @@
<string name="uid_name" msgid="7820867637514617527">"Android Core Apps"</string>
<string name="folder_name" msgid="7371454440695724752"></string>
<string name="wallpaper_instructions" msgid="563973358787555519">"Nastaviť tapetu"</string>
+ <string name="image_load_fail" msgid="2821429163328561136">"Obrázok nie je možné načítať"</string>
+ <string name="wallpaper_load_fail" msgid="1261270681127096352">"Obrázok nie je možné načítať ako tapetu"</string>
<plurals name="number_of_items_selected">
<item quantity="zero" msgid="7464587177007785408">"Počet vybratých položiek: %1$d"</item>
<item quantity="one" msgid="142482526010824029">"Počet vybratých položiek: %1$d"</item>
@@ -103,8 +105,6 @@
<string name="first_run_cling_create_screens_hint" msgid="6950729526680114157">"Vytvorte viac obrazoviek pre aplikácie a priečinky"</string>
<string name="workspace_cling_title" msgid="5626202359865825661">"Usporiadajte svoj priestor"</string>
<string name="workspace_cling_move_item" msgid="528201129978005352">"Ak chcete spravovať tapetu, miniaplikácie a nastavenia, dotknite sa pozadia a podržte."</string>
- <string name="all_apps_cling_title" msgid="34929250753095858">"Vyberte niektoré aplikácie"</string>
- <string name="all_apps_cling_add_item" msgid="400866858451850784">"Ak chcete pridať aplikáciu na plochu, dotknite sa jej a podržte."</string>
<string name="folder_cling_title" msgid="3894908818693254164">"Tu je priečinok"</string>
<string name="folder_cling_create_folder" msgid="6158215559475836131">"Ak chcete vytvoriť takýto priečinok, dotknite sa príslušnej aplikácie a podržte ju. Potom ju presuňte na druhú aplikáciu."</string>
<string name="cling_dismiss" msgid="8962359497601507581">"OK"</string>
diff --git a/res/values-sl/strings.xml b/res/values-sl/strings.xml
index 021eca8..28392fe 100644
--- a/res/values-sl/strings.xml
+++ b/res/values-sl/strings.xml
@@ -24,6 +24,8 @@
<string name="uid_name" msgid="7820867637514617527">"Osnovne aplikacije sistema Android"</string>
<string name="folder_name" msgid="7371454440695724752"></string>
<string name="wallpaper_instructions" msgid="563973358787555519">"Nastavi ozadje"</string>
+ <string name="image_load_fail" msgid="2821429163328561136">"Slike ni bilo mogoče naložiti"</string>
+ <string name="wallpaper_load_fail" msgid="1261270681127096352">"Slike ni bilo mogoče naložiti kot ozadja"</string>
<plurals name="number_of_items_selected">
<item quantity="zero" msgid="7464587177007785408">"Št. izbranih: %1$d"</item>
<item quantity="one" msgid="142482526010824029">"Št. izbranih: %1$d"</item>
@@ -103,8 +105,6 @@
<string name="first_run_cling_create_screens_hint" msgid="6950729526680114157">"Ustvarite več zaslonov za aplikacije in mape"</string>
<string name="workspace_cling_title" msgid="5626202359865825661">"Organizirajte svoj prostor"</string>
<string name="workspace_cling_move_item" msgid="528201129978005352">"Če želite upravljati ozadje, pripomočke in nastavitve, se dotaknite ozadja in ga pridržite."</string>
- <string name="all_apps_cling_title" msgid="34929250753095858">"Izberite nekaj aplikacij"</string>
- <string name="all_apps_cling_add_item" msgid="400866858451850784">"Če želite dodati aplikacijo na začetni zaslon, se je dotaknite in jo pridržite."</string>
<string name="folder_cling_title" msgid="3894908818693254164">"To je mapa"</string>
<string name="folder_cling_create_folder" msgid="6158215559475836131">"Če želite ustvariti mapo, podobno tej, se dotaknite aplikacije in jo pridržite, nato pa jo premaknite nad drugo."</string>
<string name="cling_dismiss" msgid="8962359497601507581">"V redu"</string>
diff --git a/res/values-sr/strings.xml b/res/values-sr/strings.xml
index 06d80ef..82c825b 100644
--- a/res/values-sr/strings.xml
+++ b/res/values-sr/strings.xml
@@ -24,6 +24,8 @@
<string name="uid_name" msgid="7820867637514617527">"Основне Android апликације"</string>
<string name="folder_name" msgid="7371454440695724752"></string>
<string name="wallpaper_instructions" msgid="563973358787555519">"Подеси позадину"</string>
+ <string name="image_load_fail" msgid="2821429163328561136">"Није могуће учитати слику"</string>
+ <string name="wallpaper_load_fail" msgid="1261270681127096352">"Није могуће учитати слику као позадину"</string>
<plurals name="number_of_items_selected">
<item quantity="zero" msgid="7464587177007785408">"Изабранo je %1$d"</item>
<item quantity="one" msgid="142482526010824029">"Изабрана je %1$d"</item>
@@ -103,8 +105,6 @@
<string name="first_run_cling_create_screens_hint" msgid="6950729526680114157">"Направите још екрана за апликације и директоријуме"</string>
<string name="workspace_cling_title" msgid="5626202359865825661">"Организујте простор"</string>
<string name="workspace_cling_move_item" msgid="528201129978005352">"Додирните позадину и задржите да бисте управљали позадином, виџетима и подешавањима."</string>
- <string name="all_apps_cling_title" msgid="34929250753095858">"Изаберите неколико апликација"</string>
- <string name="all_apps_cling_add_item" msgid="400866858451850784">"Да бисте додали апликацију на почетни екран, додирните је и задржите."</string>
<string name="folder_cling_title" msgid="3894908818693254164">"Ево једног директоријума"</string>
<string name="folder_cling_create_folder" msgid="6158215559475836131">"Да бисте направили директоријум попут овога, додирните и задржите апликацију, па је превуците преко друге."</string>
<string name="cling_dismiss" msgid="8962359497601507581">"Потврди"</string>
diff --git a/res/values-sv/strings.xml b/res/values-sv/strings.xml
index bf75200..9d9c544 100644
--- a/res/values-sv/strings.xml
+++ b/res/values-sv/strings.xml
@@ -24,6 +24,8 @@
<string name="uid_name" msgid="7820867637514617527">"Android Core Apps"</string>
<string name="folder_name" msgid="7371454440695724752"></string>
<string name="wallpaper_instructions" msgid="563973358787555519">"Ange bakgrund"</string>
+ <string name="image_load_fail" msgid="2821429163328561136">"Det gick inte att läsa in bilden"</string>
+ <string name="wallpaper_load_fail" msgid="1261270681127096352">"Det gick inte att läsa in bilden som bakgrund"</string>
<plurals name="number_of_items_selected">
<item quantity="zero" msgid="7464587177007785408">"%1$d har valts"</item>
<item quantity="one" msgid="142482526010824029">"%1$d har valts"</item>
@@ -103,8 +105,6 @@
<string name="first_run_cling_create_screens_hint" msgid="6950729526680114157">"Skapa fler skärmar för appar och mappar"</string>
<string name="workspace_cling_title" msgid="5626202359865825661">"Organisera ditt utrymme"</string>
<string name="workspace_cling_move_item" msgid="528201129978005352">"Tryck länge på bakgrunden om du vill hantera bakgrundsbilder, widgetar och inställningar."</string>
- <string name="all_apps_cling_title" msgid="34929250753095858">"Välj några appar"</string>
- <string name="all_apps_cling_add_item" msgid="400866858451850784">"Om du vill lägga till en app på startskärmen trycker du länge på den."</string>
<string name="folder_cling_title" msgid="3894908818693254164">"Det här är en mapp"</string>
<string name="folder_cling_create_folder" msgid="6158215559475836131">"Om du vill skapa en till mapp av det här slaget trycker du länge på en app och drar den sedan ovanpå en annan."</string>
<string name="cling_dismiss" msgid="8962359497601507581">"OK"</string>
diff --git a/res/values-sw/strings.xml b/res/values-sw/strings.xml
index c610f34..d83fc16 100644
--- a/res/values-sw/strings.xml
+++ b/res/values-sw/strings.xml
@@ -24,6 +24,8 @@
<string name="uid_name" msgid="7820867637514617527">"Programu Msingi za Android"</string>
<string name="folder_name" msgid="7371454440695724752"></string>
<string name="wallpaper_instructions" msgid="563973358787555519">"Weka mandhari"</string>
+ <string name="image_load_fail" msgid="2821429163328561136">"Haikuweza kupakia picha"</string>
+ <string name="wallpaper_load_fail" msgid="1261270681127096352">"Haikuweza kupakia picha kama mandhari"</string>
<plurals name="number_of_items_selected">
<item quantity="zero" msgid="7464587177007785408">"%1$d zimechaguliwa"</item>
<item quantity="one" msgid="142482526010824029">"%1$d zimechaguliwa"</item>
@@ -105,8 +107,6 @@
<string name="first_run_cling_create_screens_hint" msgid="6950729526680114157">"Unda skrini zaidi za programu na folda"</string>
<string name="workspace_cling_title" msgid="5626202359865825661">"Panga nafasi yako"</string>
<string name="workspace_cling_move_item" msgid="528201129978005352">"Gusa na ushikilie mandharinyuma ili udhibiti mandhari, wijeti, na mipangilio."</string>
- <string name="all_apps_cling_title" msgid="34929250753095858">"Chagua programu kadhaa"</string>
- <string name="all_apps_cling_add_item" msgid="400866858451850784">"Ili kuongeza programu kwenye Skrini yako Kuu, iguse na uishikilie."</string>
<string name="folder_cling_title" msgid="3894908818693254164">"Hii ni folda"</string>
<string name="folder_cling_create_folder" msgid="6158215559475836131">"Ili kuunda kama hii, gusa na ushikilie programu, kisha ipitishe juu ya nyingine."</string>
<string name="cling_dismiss" msgid="8962359497601507581">"SAWA"</string>
diff --git a/res/values-sw600dp-land/dimens.xml b/res/values-sw600dp-land/dimens.xml
index 7f5594d..f9ca01b 100644
--- a/res/values-sw600dp-land/dimens.xml
+++ b/res/values-sw600dp-land/dimens.xml
@@ -15,12 +15,6 @@
-->
<resources>
-<!-- AppsCustomize -->
- <dimen name="apps_customize_pageLayoutWidthGap">36dp</dimen>
- <dimen name="apps_customize_pageLayoutHeightGap">8dp</dimen>
- <dimen name="apps_customize_pageLayoutPaddingTop">20dp</dimen>
- <dimen name="apps_customize_pageLayoutPaddingBottom">14dp</dimen>
-
<!-- QSB -->
<dimen name="toolbar_button_vertical_padding">12dip</dimen>
<dimen name="toolbar_button_horizontal_padding">20dip</dimen>
diff --git a/res/values-sw720dp-land/dimens.xml b/res/values-sw720dp-land/dimens.xml
index eb8f83c..433a5d4 100644
--- a/res/values-sw720dp-land/dimens.xml
+++ b/res/values-sw720dp-land/dimens.xml
@@ -21,9 +21,6 @@
<integer name="apps_customize_cling_focused_x">4</integer>
<integer name="apps_customize_cling_focused_y">2</integer>
-<!-- Workspace -->
- <dimen name="workspace_page_spacing">50dp</dimen>
-
<!-- the area at the edge of the screen that makes the workspace go left
or right while you're dragging. -->
<dimen name="scroll_zone">100dip</dimen>
diff --git a/res/values-sw720dp-port/dimens.xml b/res/values-sw720dp-port/dimens.xml
index 62bdaaa..9fe312b 100644
--- a/res/values-sw720dp-port/dimens.xml
+++ b/res/values-sw720dp-port/dimens.xml
@@ -19,7 +19,6 @@
<!-- the area at the edge of the screen that makes the workspace go left
or right while you're dragging. -->
<dimen name="scroll_zone">40dp</dimen>
- <dimen name="workspace_page_spacing">24dp</dimen>
<integer name="apps_customize_cling_focused_x">2</integer>
<integer name="apps_customize_cling_focused_y">2</integer>
diff --git a/res/values-th/strings.xml b/res/values-th/strings.xml
index 68118a7..9d78b3b 100644
--- a/res/values-th/strings.xml
+++ b/res/values-th/strings.xml
@@ -24,6 +24,8 @@
<string name="uid_name" msgid="7820867637514617527">"แอปหลักของแอนดรอยด์"</string>
<string name="folder_name" msgid="7371454440695724752"></string>
<string name="wallpaper_instructions" msgid="563973358787555519">"ตั้งค่าวอลเปเปอร์"</string>
+ <string name="image_load_fail" msgid="2821429163328561136">"ไม่สามารถโหลดรูปภาพ"</string>
+ <string name="wallpaper_load_fail" msgid="1261270681127096352">"ไม่สามารถโหลดรูปภาพเป็นวอลเปเปอร์"</string>
<plurals name="number_of_items_selected">
<item quantity="zero" msgid="7464587177007785408">"เลือกไว้ %1$d"</item>
<item quantity="one" msgid="142482526010824029">"เลือกไว้ %1$d"</item>
@@ -103,8 +105,6 @@
<string name="first_run_cling_create_screens_hint" msgid="6950729526680114157">"สร้างหน้าจอเพิ่มสำหรับแอปและโฟลเดอร์"</string>
<string name="workspace_cling_title" msgid="5626202359865825661">"จัดระเบียบพื้นที่ของคุณ"</string>
<string name="workspace_cling_move_item" msgid="528201129978005352">"แตะพื้นหลังค้างไว้เพื่อจัดการวอลเปเปอร์ วิดเจ็ต และการตั้งค่า"</string>
- <string name="all_apps_cling_title" msgid="34929250753095858">"เลือกบางแอป"</string>
- <string name="all_apps_cling_add_item" msgid="400866858451850784">"หากต้องการเพิ่มแอปลงในหน้าจอหลัก ให้แตะแอปค้างไว้"</string>
<string name="folder_cling_title" msgid="3894908818693254164">"นี่คือโฟลเดอร์"</string>
<string name="folder_cling_create_folder" msgid="6158215559475836131">"หากต้องการสร้างโฟลเดอร์ลักษณะนี้ แตะแอปค้างไว้ แล้วย้ายไปทับอีกแอปหนึ่ง"</string>
<string name="cling_dismiss" msgid="8962359497601507581">"ตกลง"</string>
diff --git a/res/values-tl/strings.xml b/res/values-tl/strings.xml
index 56801b4..bdc2363 100644
--- a/res/values-tl/strings.xml
+++ b/res/values-tl/strings.xml
@@ -24,6 +24,8 @@
<string name="uid_name" msgid="7820867637514617527">"Android Core Apps"</string>
<string name="folder_name" msgid="7371454440695724752"></string>
<string name="wallpaper_instructions" msgid="563973358787555519">"Itakda ang wallpaper"</string>
+ <string name="image_load_fail" msgid="2821429163328561136">"Hindi ma-load ang larawan"</string>
+ <string name="wallpaper_load_fail" msgid="1261270681127096352">"Hindi ma-load ang larawan bilang wallpaper"</string>
<plurals name="number_of_items_selected">
<item quantity="zero" msgid="7464587177007785408">"%1$d ang napili"</item>
<item quantity="one" msgid="142482526010824029">"%1$d ang napili"</item>
@@ -103,8 +105,6 @@
<string name="first_run_cling_create_screens_hint" msgid="6950729526680114157">"Gumawa ng higit pang mga screen para sa apps at mga folder"</string>
<string name="workspace_cling_title" msgid="5626202359865825661">"Ayusin ang iyong espasyo"</string>
<string name="workspace_cling_move_item" msgid="528201129978005352">"Pindutin nang matagal ang background upang pamahalaan ang wallpaper, mga widget at setting"</string>
- <string name="all_apps_cling_title" msgid="34929250753095858">"Pumili ng ilang apps"</string>
- <string name="all_apps_cling_add_item" msgid="400866858451850784">"Upang magdagdag ng app sa iyong Home screen, pindutin ito nang matagal."</string>
<string name="folder_cling_title" msgid="3894908818693254164">"Narito ang isang folder"</string>
<string name="folder_cling_create_folder" msgid="6158215559475836131">"Upang gumawa ng katulad nito, pindutin nang matagal ang isang app, pagkatapos ay ilipat ito sa isa pang folder."</string>
<string name="cling_dismiss" msgid="8962359497601507581">"OK"</string>
diff --git a/res/values-tr/strings.xml b/res/values-tr/strings.xml
index dbbdee2..e2fbf21 100644
--- a/res/values-tr/strings.xml
+++ b/res/values-tr/strings.xml
@@ -24,6 +24,8 @@
<string name="uid_name" msgid="7820867637514617527">"Android Çekirdek Uygulamaları"</string>
<string name="folder_name" msgid="7371454440695724752"></string>
<string name="wallpaper_instructions" msgid="563973358787555519">"Duvar kağıdını ayarla"</string>
+ <string name="image_load_fail" msgid="2821429163328561136">"Resim yüklenemedi"</string>
+ <string name="wallpaper_load_fail" msgid="1261270681127096352">"Resim duvar kağıdı olarak yüklenemedi"</string>
<plurals name="number_of_items_selected">
<item quantity="zero" msgid="7464587177007785408">"%1$d tane seçildi"</item>
<item quantity="one" msgid="142482526010824029">"%1$d tane seçildi"</item>
@@ -103,8 +105,6 @@
<string name="first_run_cling_create_screens_hint" msgid="6950729526680114157">"Uygulamalar ve klasörler için daha fazla ekran oluşturun"</string>
<string name="workspace_cling_title" msgid="5626202359865825661">"Alanınızı düzenleyin"</string>
<string name="workspace_cling_move_item" msgid="528201129978005352">"Duvar kağıdını, widget\'ları ve ayarları yönetmek için arka plana uzun basın."</string>
- <string name="all_apps_cling_title" msgid="34929250753095858">"İstediğiniz uygulamaları seçin"</string>
- <string name="all_apps_cling_add_item" msgid="400866858451850784">"Bir uygulamayı Ana ekranınıza eklemek için, ilgili uygulamayı basılı tutun."</string>
<string name="folder_cling_title" msgid="3894908818693254164">"İşte bir klasör"</string>
<string name="folder_cling_create_folder" msgid="6158215559475836131">"Buna benzer bir klasör oluşturmak için uygulamaya uzun basın ve sonra uygulamayı başka bir uygulamanın üzerine taşıyın."</string>
<string name="cling_dismiss" msgid="8962359497601507581">"Tamam"</string>
diff --git a/res/values-uk/strings.xml b/res/values-uk/strings.xml
index e0f3211..6b397a0 100644
--- a/res/values-uk/strings.xml
+++ b/res/values-uk/strings.xml
@@ -24,6 +24,8 @@
<string name="uid_name" msgid="7820867637514617527">"Базові програми Android"</string>
<string name="folder_name" msgid="7371454440695724752"></string>
<string name="wallpaper_instructions" msgid="563973358787555519">"Установити фон"</string>
+ <string name="image_load_fail" msgid="2821429163328561136">"Не вдалося завантажити зображення"</string>
+ <string name="wallpaper_load_fail" msgid="1261270681127096352">"Не вдалося завантажити зображення як фоновий малюнок"</string>
<plurals name="number_of_items_selected">
<item quantity="zero" msgid="7464587177007785408">"Вибрано %1$d"</item>
<item quantity="one" msgid="142482526010824029">"Вибрано %1$d"</item>
@@ -103,8 +105,6 @@
<string name="first_run_cling_create_screens_hint" msgid="6950729526680114157">"Створюйте нові екрани для програм і папок"</string>
<string name="workspace_cling_title" msgid="5626202359865825661">"Організуйте робочий простір"</string>
<string name="workspace_cling_move_item" msgid="528201129978005352">"Натисніть і утримуйте фон, щоб керувати фоновим малюнком, віджетами та налаштуваннями."</string>
- <string name="all_apps_cling_title" msgid="34929250753095858">"Виберіть програми"</string>
- <string name="all_apps_cling_add_item" msgid="400866858451850784">"Щоб додати програму на головний екран, торкніться й утримуйте її."</string>
<string name="folder_cling_title" msgid="3894908818693254164">"Це папка"</string>
<string name="folder_cling_create_folder" msgid="6158215559475836131">"Щоб створити папку, натисніть і утримуйте програму, а потім перетягніть її на іншу."</string>
<string name="cling_dismiss" msgid="8962359497601507581">"OК"</string>
diff --git a/res/values-vi/strings.xml b/res/values-vi/strings.xml
index 3b081d0..abe4dec 100644
--- a/res/values-vi/strings.xml
+++ b/res/values-vi/strings.xml
@@ -24,6 +24,8 @@
<string name="uid_name" msgid="7820867637514617527">"Ứng dụng lõi Android"</string>
<string name="folder_name" msgid="7371454440695724752"></string>
<string name="wallpaper_instructions" msgid="563973358787555519">"Đặt hình nền"</string>
+ <string name="image_load_fail" msgid="2821429163328561136">"Không thể tải hình ảnh"</string>
+ <string name="wallpaper_load_fail" msgid="1261270681127096352">"Không thể tải hình ảnh làm hình nền"</string>
<plurals name="number_of_items_selected">
<item quantity="zero" msgid="7464587177007785408">"Đã chọn %1$d"</item>
<item quantity="one" msgid="142482526010824029">"Đã chọn %1$d"</item>
@@ -103,8 +105,6 @@
<string name="first_run_cling_create_screens_hint" msgid="6950729526680114157">"Tạo thêm màn hình cho ứng dụng và thư mục"</string>
<string name="workspace_cling_title" msgid="5626202359865825661">"Sắp xếp không gian của bạn"</string>
<string name="workspace_cling_move_item" msgid="528201129978005352">"Chạm và giữ nền để quản lý hình nền, tiện ích con và cài đặt."</string>
- <string name="all_apps_cling_title" msgid="34929250753095858">"Chọn một số ứng dụng"</string>
- <string name="all_apps_cling_add_item" msgid="400866858451850784">"Để thêm ứng dụng vào Màn hình chính của bạn, chạm và giữ ứng dụng đó."</string>
<string name="folder_cling_title" msgid="3894908818693254164">"Đây là một thư mục"</string>
<string name="folder_cling_create_folder" msgid="6158215559475836131">"Để tạo thư mục như thế này, hãy chạm và giữ một ứng dụng, sau đó di chuyển ứng dụng đó lên trên một ứng dụng khác."</string>
<string name="cling_dismiss" msgid="8962359497601507581">"OK"</string>
diff --git a/res/values-zh-rCN/strings.xml b/res/values-zh-rCN/strings.xml
index 43a57c4..d8d260d 100644
--- a/res/values-zh-rCN/strings.xml
+++ b/res/values-zh-rCN/strings.xml
@@ -24,6 +24,8 @@
<string name="uid_name" msgid="7820867637514617527">"Android 核心应用"</string>
<string name="folder_name" msgid="7371454440695724752"></string>
<string name="wallpaper_instructions" msgid="563973358787555519">"设置壁纸"</string>
+ <string name="image_load_fail" msgid="2821429163328561136">"无法加载图片"</string>
+ <string name="wallpaper_load_fail" msgid="1261270681127096352">"无法加载要设为壁纸的图片"</string>
<plurals name="number_of_items_selected">
<item quantity="zero" msgid="7464587177007785408">"已选择%1$d项"</item>
<item quantity="one" msgid="142482526010824029">"已选择%1$d项"</item>
@@ -103,8 +105,6 @@
<string name="first_run_cling_create_screens_hint" msgid="6950729526680114157">"添加更多屏幕来容纳应用和文件夹"</string>
<string name="workspace_cling_title" msgid="5626202359865825661">"整理您的空间"</string>
<string name="workspace_cling_move_item" msgid="528201129978005352">"触摸并按住背景,即可管理壁纸、小部件和设置。"</string>
- <string name="all_apps_cling_title" msgid="34929250753095858">"选择一些应用"</string>
- <string name="all_apps_cling_add_item" msgid="400866858451850784">"要将应用添加到主屏幕,请触摸并按住该应用。"</string>
<string name="folder_cling_title" msgid="3894908818693254164">"这是一个文件夹"</string>
<string name="folder_cling_create_folder" msgid="6158215559475836131">"要创建一个类似的文件夹,请触摸并按住某个应用,然后将其移至另一个应用上。"</string>
<string name="cling_dismiss" msgid="8962359497601507581">"确定"</string>
diff --git a/res/values-zh-rHK/strings.xml b/res/values-zh-rHK/strings.xml
index eb3def4..56ea177 100644
--- a/res/values-zh-rHK/strings.xml
+++ b/res/values-zh-rHK/strings.xml
@@ -24,6 +24,8 @@
<string name="uid_name" msgid="7820867637514617527">"Android 核心應用程式"</string>
<string name="folder_name" msgid="7371454440695724752"></string>
<string name="wallpaper_instructions" msgid="563973358787555519">"設定桌布"</string>
+ <string name="image_load_fail" msgid="2821429163328561136">"無法載入圖片"</string>
+ <string name="wallpaper_load_fail" msgid="1261270681127096352">"無法載入圖片設為桌布"</string>
<plurals name="number_of_items_selected">
<item quantity="zero" msgid="7464587177007785408">"已選取 %1$d 個"</item>
<item quantity="one" msgid="142482526010824029">"已選取 %1$d 個"</item>
@@ -103,8 +105,6 @@
<string name="first_run_cling_create_screens_hint" msgid="6950729526680114157">"建立更多應用程式和資料夾的畫面"</string>
<string name="workspace_cling_title" msgid="5626202359865825661">"管理您的空間"</string>
<string name="workspace_cling_move_item" msgid="528201129978005352">"輕觸並按住背景,即可管理桌布、小工具和設定。"</string>
- <string name="all_apps_cling_title" msgid="34929250753095858">"選擇一些應用程式"</string>
- <string name="all_apps_cling_add_item" msgid="400866858451850784">"輕觸並按住應用程式,即可加到主畫面。"</string>
<string name="folder_cling_title" msgid="3894908818693254164">"資料夾顯示如下"</string>
<string name="folder_cling_create_folder" msgid="6158215559475836131">"如要建立類似的資料夾,請輕觸並按住某個應用程式,然後疊到另一個應用程式之上。"</string>
<string name="cling_dismiss" msgid="8962359497601507581">"確定"</string>
diff --git a/res/values-zh-rTW/strings.xml b/res/values-zh-rTW/strings.xml
index a68f163..0520c9d 100644
--- a/res/values-zh-rTW/strings.xml
+++ b/res/values-zh-rTW/strings.xml
@@ -24,6 +24,8 @@
<string name="uid_name" msgid="7820867637514617527">"Android 核心應用程式"</string>
<string name="folder_name" msgid="7371454440695724752"></string>
<string name="wallpaper_instructions" msgid="563973358787555519">"設定桌布"</string>
+ <string name="image_load_fail" msgid="2821429163328561136">"無法載入圖片"</string>
+ <string name="wallpaper_load_fail" msgid="1261270681127096352">"無法載入您要設為桌布的圖片"</string>
<plurals name="number_of_items_selected">
<item quantity="zero" msgid="7464587177007785408">"已選取 %1$d 個項目"</item>
<item quantity="one" msgid="142482526010824029">"已選取 %1$d 個項目"</item>
@@ -103,8 +105,6 @@
<string name="first_run_cling_create_screens_hint" msgid="6950729526680114157">"建立更多畫面容納應用程式和資料夾"</string>
<string name="workspace_cling_title" msgid="5626202359865825661">"管理您的空間"</string>
<string name="workspace_cling_move_item" msgid="528201129978005352">"輕觸並按住背景,即可管理桌布、小工具和設定。"</string>
- <string name="all_apps_cling_title" msgid="34929250753095858">"選擇一些應用程式"</string>
- <string name="all_apps_cling_add_item" msgid="400866858451850784">"如要將應用程式新增至主螢幕,請輕觸並按住目標。"</string>
<string name="folder_cling_title" msgid="3894908818693254164">"資料夾顯示如下"</string>
<string name="folder_cling_create_folder" msgid="6158215559475836131">"如要建立類似的資料夾,請輕觸並按住應用程式,然後將應用程式疊放在另一個應用程式上。"</string>
<string name="cling_dismiss" msgid="8962359497601507581">"確定"</string>
diff --git a/res/values-zu/strings.xml b/res/values-zu/strings.xml
index da790e6..dafb95d 100644
--- a/res/values-zu/strings.xml
+++ b/res/values-zu/strings.xml
@@ -24,6 +24,8 @@
<string name="uid_name" msgid="7820867637514617527">"Izinhlelo zokusebenza ze-Android Core"</string>
<string name="folder_name" msgid="7371454440695724752"></string>
<string name="wallpaper_instructions" msgid="563973358787555519">"Setha isithombe sangemuva"</string>
+ <string name="image_load_fail" msgid="2821429163328561136">"Ayikwazanga ukulayisha isithombe"</string>
+ <string name="wallpaper_load_fail" msgid="1261270681127096352">"Ayikwazanga ukulayisha isithombe njengesithombe sangemuva"</string>
<plurals name="number_of_items_selected">
<item quantity="zero" msgid="7464587177007785408">"%1$d khethiwe"</item>
<item quantity="one" msgid="142482526010824029">"%1$d khethiwe"</item>
@@ -103,8 +105,6 @@
<string name="first_run_cling_create_screens_hint" msgid="6950729526680114157">"Dala izikrini eziningi zezinhlelo zokusebenza namafolda"</string>
<string name="workspace_cling_title" msgid="5626202359865825661">"Hlela isikhala sakho"</string>
<string name="workspace_cling_move_item" msgid="528201129978005352">"Thinta uphinde ubambe okungemuva ukuze uphathe isithombe sangemuva, amawijethi nezilungiselelo."</string>
- <string name="all_apps_cling_title" msgid="34929250753095858">"Khetha izinhlelo zokusebenza ezithile"</string>
- <string name="all_apps_cling_add_item" msgid="400866858451850784">"Ukuze ungeze uhlelo lokusebenza kusikrini sakho se-Ikhaya, thinta futhi uyibambe."</string>
<string name="folder_cling_title" msgid="3894908818693254164">"Nayi ifolda"</string>
<string name="folder_cling_create_folder" msgid="6158215559475836131">"Ukuze udale eyodwa efana nale, thinta uphinde ubambe uhlelo lokusebenza, bese ulidlulisa ngaphezulu kwelinye."</string>
<string name="cling_dismiss" msgid="8962359497601507581">"KULUNGILE"</string>
diff --git a/res/values/attrs.xml b/res/values/attrs.xml
index a2d3a83..0006a74 100644
--- a/res/values/attrs.xml
+++ b/res/values/attrs.xml
@@ -103,8 +103,7 @@
<attr name="pageLayoutPaddingBottom" format="dimension" />
<attr name="pageLayoutPaddingLeft" format="dimension" />
<attr name="pageLayoutPaddingRight" format="dimension" />
- <!-- The space between adjacent pages of the PagedView. -->
- <attr name="pageSpacing" format="dimension" />
+
<!-- The page indicator for this workspace -->
<attr name="pageIndicator" format="reference" />
</declare-styleable>
diff --git a/res/values/colors.xml b/res/values/colors.xml
index dc35a3f..c073903 100644
--- a/res/values/colors.xml
+++ b/res/values/colors.xml
@@ -34,6 +34,7 @@
<color name="apps_customize_icon_text_color">#FFF</color>
<color name="wallpaper_picker_translucent_gray">#66000000</color>
<color name="folder_items_text_color">#FF333333</color>
+ <color name="folder_items_glow_color">#FFCCCCCC</color>
<color name="outline_color">#FFFFFFFF</color>
<color name="first_run_cling_circle_background_color">#64b1ea</color>
diff --git a/res/values/config.xml b/res/values/config.xml
index 4978281..1a83556 100644
--- a/res/values/config.xml
+++ b/res/values/config.xml
@@ -1,4 +1,10 @@
<resources>
+<!-- Dynamic Grid -->
+ <integer name="config_dynamic_grid_max_long_edge_cell_count">6</integer>
+ <integer name="config_dynamic_grid_max_short_edge_cell_count">5</integer>
+ <integer name="config_dynamic_grid_min_edge_cell_count">3</integer>
+
+<!-- Miscellaneous -->
<bool name="config_largeHeap">false</bool>
<bool name="is_tablet">false</bool>
<bool name="is_large_tablet">false</bool>
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index b4b2367..740393e 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -20,6 +20,9 @@
<dimen name="dynamic_grid_search_bar_max_width">500dp</dimen>
<dimen name="dynamic_grid_search_bar_height">48dp</dimen>
<dimen name="dynamic_grid_page_indicator_height">24dp</dimen>
+ <dimen name="dynamic_grid_icon_drawable_padding">4dp</dimen>
+ <dimen name="dynamic_grid_all_apps_cell_padding">18dp</dimen>
+ <dimen name="dynamic_grid_workspace_page_spacing">8dp</dimen>
<!-- Wallpaper picker -->
<dimen name="wallpaperThumbnailWidth">106.5dp</dimen>
@@ -36,11 +39,16 @@
<add-resource type="dimen" name="custom_cling_margin_top" />
<add-resource type="dimen" name="custom_cling_margin_right" />
<add-resource type="dimen" name="custom_cling_margin_left" />
+
+ <dimen name="cling_title_text_size">20sp</dimen>
+ <dimen name="cling_text_size">14sp</dimen>
+ <dimen name="cling_alt_title_text_size">24sp</dimen>
+ <dimen name="cling_alt_text_size">16sp</dimen>
+ <dimen name="cling_hint_text_size">14sp</dimen>
<!-- Workspace -->
<dimen name="workspace_max_gap">16dp</dimen>
<dimen name="workspace_overscroll_drawable_padding">0dp</dimen>
- <dimen name="workspace_spring_loaded_page_spacing">15dp</dimen>
<dimen name="overview_panel_bottom_padding">50dp</dimen>
<dimen name="overview_panel_buttonSpacing">60dp</dimen>
<dimen name="overview_mode_page_offset">130dp</dimen>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index cafa424..30f4d8f 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -30,6 +30,14 @@
<string name="folder_name"></string>
<!-- Button label on Wallpaper picker screen; user selects this button to set a specific wallpaper -->
<string name="wallpaper_instructions">Set wallpaper</string>
+ <!-- Error message when an image is selected as a wallpaper,
+ but the wallpaper picker cannot load it -->
+ <string name="image_load_fail">Coudn\'t load image</string>
+ <!-- Error message when an image is selected as a wallpaper,
+ but the wallpaper cropper cannot load it. The user will
+ usually see this when using another app and trying to set
+ an image as the wallpaper -->
+ <string name="wallpaper_load_fail">Couldn\'t load image as wallpaper</string>
<!-- Shown when wallpapers are selected in Wallpaper picker -->
<!-- String indicating how many media item(s) is(are) selected
eg. 1 selected [CHAR LIMIT=30] -->
@@ -230,7 +238,7 @@
<string name="apps_customize_widgets_scroll_format">Widgets page %1$d of %2$d</string>
<!-- Clings -->
- <!-- The title text for the workspace cling [CHAR_LIMIT=60] -->
+ <!-- The title text for the workspace cling [CHAR_LIMIT=30] -->
<string name="first_run_cling_title">Welcome!</string>
<!-- The description of how to use the workspace [CHAR_LIMIT=60] -->
<string name="first_run_cling_description">Make yourself at home.</string>
@@ -240,17 +248,13 @@
<string name="first_run_cling_search_bar_hint"></string>
<!-- The description of how to use the workspace [CHAR_LIMIT=60] -->
<string name="first_run_cling_create_screens_hint">Create more screens for apps and folders</string>
- <!-- The title text for the workspace cling [CHAR_LIMIT=60] -->
+ <!-- The title text for the workspace cling [CHAR_LIMIT=30] -->
<string name="workspace_cling_title">Organize your space</string>
- <!-- The description of how to use the workspace [CHAR_LIMIT=160] -->
+ <!-- The description of how to use the workspace [CHAR_LIMIT=70] -->
<string name="workspace_cling_move_item">Touch & hold background to manage wallpaper, widgets and settings.</string>
- <!-- The title text for the All Apps cling [CHAR_LIMIT=60] -->
- <string name="all_apps_cling_title">Choose some apps</string>
- <!-- The description of how to pick up and add an item to the workspace [CHAR_LIMIT=160] -->
- <string name="all_apps_cling_add_item">To add an app to your Home screen, touch & hold it.</string>
- <!-- The title text for the Folder cling [CHAR_LIMIT=60] -->
+ <!-- The title text for the Folder cling [CHAR_LIMIT=30] -->
<string name="folder_cling_title">Here\'s a folder</string>
- <!-- The description of how to create a folder [CHAR_LIMIT=160] -->
+ <!-- The description of how to create a folder [CHAR_LIMIT=70] -->
<string name="folder_cling_create_folder">To create one like this, touch & hold an app, then move it over another.</string>
<!-- The text on the button to dismiss a cling [CHAR_LIMIT=30] -->
<string name="cling_dismiss">OK</string>
diff --git a/res/values/styles.xml b/res/values/styles.xml
index a1d2c5c..8226915 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -52,27 +52,33 @@
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_marginBottom">5dp</item>
- <item name="android:textSize">22sp</item>
+ <item name="android:textSize">@dimen/cling_title_text_size</item>
<item name="android:textColor">#ffffff</item>
<item name="android:fontFamily">sans-serif-condensed</item>
</style>
- <style name="ClingAltTitleText">
- <item name="android:layout_width">wrap_content</item>
- <item name="android:layout_height">wrap_content</item>
- <item name="android:textSize">24sp</item>
- <item name="android:textColor">#49C0EC</item>
- </style>
<style name="ClingText">
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">wrap_content</item>
- <item name="android:textSize">16sp</item>
+ <item name="android:textSize">@dimen/cling_text_size</item>
<item name="android:textColor">#80000000</item>
<item name="android:lineSpacingMultiplier">1.1</item>
</style>
+ <style name="ClingAltTitleText">
+ <item name="android:layout_width">wrap_content</item>
+ <item name="android:layout_height">wrap_content</item>
+ <item name="android:textSize">@dimen/cling_alt_title_text_size</item>
+ <item name="android:textColor">#49C0EC</item>
+ </style>
+ <style name="ClingAltText">
+ <item name="android:layout_width">wrap_content</item>
+ <item name="android:layout_height">wrap_content</item>
+ <item name="android:textSize">@dimen/cling_alt_text_size</item>
+ <item name="android:textColor">#49C0EC</item>
+ </style>
<style name="ClingHintText">
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">wrap_content</item>
- <item name="android:textSize">18sp</item>
+ <item name="android:textSize">@dimen/cling_hint_text_size</item>
<item name="android:textColor">#80ffffff</item>
<item name="android:fontFamily">sans-serif-condensed</item>
</style>
@@ -98,7 +104,7 @@
<style name="WorkspaceIcon.AppsCustomize">
<item name="android:background">@null</item>
<item name="android:textColor">@color/apps_customize_icon_text_color</item>
- <item name="android:drawablePadding">4dp</item>
+ <item name="android:drawablePadding">@dimen/dynamic_grid_icon_drawable_padding</item>
<item name="android:shadowRadius">4.0</item>
<item name="android:shadowColor">#FF000000</item>
</style>
diff --git a/src/com/android/launcher3/AppsCustomizePagedView.java b/src/com/android/launcher3/AppsCustomizePagedView.java
index 9b35bb5..d9ca157 100644
--- a/src/com/android/launcher3/AppsCustomizePagedView.java
+++ b/src/com/android/launcher3/AppsCustomizePagedView.java
@@ -187,6 +187,7 @@
private PagedViewCellLayout mWidgetSpacingLayout;
private int mNumAppsPages;
private int mNumWidgetPages;
+ private Rect mAllAppsPadding = new Rect();
// Relating to the scroll and overscroll effects
Workspace.ZInterpolator mZInterpolator = new Workspace.ZInterpolator(0.5f);
@@ -293,6 +294,13 @@
grid.edgeMarginPx, 2 * grid.edgeMarginPx);
}
+ void setAllAppsPadding(Rect r) {
+ mAllAppsPadding.set(r);
+ }
+ void setWidgetsPageIndicatorPadding(int pageIndicatorHeight) {
+ mPageLayoutPaddingBottom = pageIndicatorHeight;
+ }
+
/** Returns the item index of the center item on this page so that we can restore to this
* item index when we rotate. */
private int getMiddleComponentIndexOnCurrentPage() {
@@ -811,13 +819,23 @@
!(target instanceof DeleteDropTarget))) {
// Exit spring loaded mode if we have not successfully dropped or have not handled the
// drop in Workspace
- mLauncher.exitSpringLoadedDragMode();
+ mLauncher.getWorkspace().removeExtraEmptyScreen(true, new Runnable() {
+ @Override
+ public void run() {
+ mLauncher.exitSpringLoadedDragMode();
+ mLauncher.unlockScreenOrientation(false);
+ }
+ });
+ } else {
+ mLauncher.unlockScreenOrientation(false);
}
- mLauncher.unlockScreenOrientation(false);
}
@Override
public View getContent() {
+ if (getChildCount() > 0) {
+ return getChildAt(0);
+ }
return null;
}
@@ -841,7 +859,7 @@
public void onLauncherTransitionEnd(Launcher l, boolean animated, boolean toWorkspace) {
mInTransition = false;
for (AsyncTaskPageData d : mDeferredSyncWidgetPageItems) {
- onSyncWidgetPageItems(d);
+ onSyncWidgetPageItems(d, false);
}
mDeferredSyncWidgetPageItems.clear();
for (Runnable r : mDeferredPrepareLoadWidgetPreviewsTasks) {
@@ -935,12 +953,12 @@
}
public void setContentType(ContentType type) {
- int page = getCurrentPage();
- if (mContentType != type) {
- page = 0;
+ // Widgets appear to be cleared every time you leave, always force invalidate for them
+ if (mContentType != type || type == ContentType.Widgets) {
+ int page = (mContentType != type) ? 0 : getCurrentPage();
+ mContentType = type;
+ invalidatePageData(page, true);
}
- mContentType = type;
- invalidatePageData(page, true);
}
public ContentType getContentType() {
@@ -985,6 +1003,8 @@
int heightSpec = MeasureSpec.makeMeasureSpec(mContentHeight, MeasureSpec.AT_MOST);
layout.setMinimumWidth(getPageContentWidth());
layout.measure(widthSpec, heightSpec);
+ layout.setPadding(mAllAppsPadding.left, mAllAppsPadding.top, mAllAppsPadding.right,
+ mAllAppsPadding.bottom);
setVisibilityOnChildren(layout, View.VISIBLE);
}
@@ -1110,7 +1130,7 @@
mRunningTasks.remove(task);
if (task.isCancelled()) return;
// do cleanup inside onSyncWidgetPageItems
- onSyncWidgetPageItems(data);
+ onSyncWidgetPageItems(data, false);
}
}, mWidgetPreviewLoader);
@@ -1226,7 +1246,7 @@
AsyncTaskPageData data = new AsyncTaskPageData(page, items,
maxPreviewWidth, maxPreviewHeight, null, null, mWidgetPreviewLoader);
loadWidgetPreviewsInBackground(null, data);
- onSyncWidgetPageItems(data);
+ onSyncWidgetPageItems(data, immediate);
} else {
if (mInTransition) {
mDeferredPrepareLoadWidgetPreviewsTasks.add(this);
@@ -1265,8 +1285,8 @@
}
}
- private void onSyncWidgetPageItems(AsyncTaskPageData data) {
- if (mInTransition) {
+ private void onSyncWidgetPageItems(AsyncTaskPageData data, boolean immediatelySyncItems) {
+ if (!immediatelySyncItems && mInTransition) {
mDeferredSyncWidgetPageItems.add(data);
return;
}
diff --git a/src/com/android/launcher3/AppsCustomizeTabHost.java b/src/com/android/launcher3/AppsCustomizeTabHost.java
index bfcf92a..697bd7e 100644
--- a/src/com/android/launcher3/AppsCustomizeTabHost.java
+++ b/src/com/android/launcher3/AppsCustomizeTabHost.java
@@ -367,6 +367,10 @@
@Override
public View getContent() {
+ View appsCustomizeContent = mAppsCustomizePane.getContent();
+ if (appsCustomizeContent != null) {
+ return appsCustomizeContent;
+ }
return mContent;
}
@@ -397,6 +401,7 @@
@Override
public void onLauncherTransitionStart(Launcher l, boolean animated, boolean toWorkspace) {
+ mAppsCustomizePane.onLauncherTransitionStart(l, animated, toWorkspace);
if (animated) {
enableAndBuildHardwareLayer();
}
@@ -407,7 +412,7 @@
@Override
public void onLauncherTransitionStep(Launcher l, float t) {
- // Do nothing
+ mAppsCustomizePane.onLauncherTransitionStep(l, t);
}
@Override
diff --git a/src/com/android/launcher3/BubbleTextView.java b/src/com/android/launcher3/BubbleTextView.java
index 8dab943..30016e5 100644
--- a/src/com/android/launcher3/BubbleTextView.java
+++ b/src/com/android/launcher3/BubbleTextView.java
@@ -87,7 +87,7 @@
// Ensure we are using the right text size
LauncherAppState app = LauncherAppState.getInstance();
DeviceProfile grid = app.getDynamicGrid().getDeviceProfile();
- setTextSize(TypedValue.COMPLEX_UNIT_SP, grid.iconTextSize);
+ setTextSize(TypedValue.COMPLEX_UNIT_PX, grid.iconTextSizePx);
setTextColor(getResources().getColor(R.color.workspace_icon_text_color));
}
@@ -111,7 +111,7 @@
setCompoundDrawables(null,
Utilities.createIconDrawable(b), null, null);
- setCompoundDrawablePadding((int) ((grid.folderIconSizePx - grid.iconSizePx) / 2f));
+ setCompoundDrawablePadding(grid.iconDrawablePaddingPx);
setText(info.title);
setTag(info);
}
@@ -203,6 +203,10 @@
destCanvas.restore();
}
+ public void setGlowColor(int color) {
+ mFocusedOutlineColor = mFocusedGlowColor = mPressedOutlineColor = mPressedGlowColor = color;
+ }
+
/**
* Returns a new bitmap to be used as the object outline, e.g. to visualize the drop location.
* Responsibility for the bitmap is transferred to the caller.
diff --git a/src/com/android/launcher3/CellLayout.java b/src/com/android/launcher3/CellLayout.java
index dafb79f..df16d41 100644
--- a/src/com/android/launcher3/CellLayout.java
+++ b/src/com/android/launcher3/CellLayout.java
@@ -76,6 +76,7 @@
private int mHeightGap;
private int mMaxGap;
private boolean mScrollingTransformsDirty = false;
+ private boolean mDropPending = false;
private final Rect mRect = new Rect();
private final CellInfo mCellInfo = new CellInfo();
@@ -214,7 +215,7 @@
setAlwaysDrawnWithCacheEnabled(false);
final Resources res = getResources();
- mHotseatScale = (float) grid.hotseatIconSize / grid.iconSize;
+ mHotseatScale = (float) grid.hotseatIconSizePx / grid.iconSizePx;
mNormalBackground = res.getDrawable(R.drawable.screenpanel);
mActiveGlowBackground = res.getDrawable(R.drawable.screenpanel_hover);
@@ -332,6 +333,14 @@
mShortcutsAndWidgets.setInvertIfRtl(invert);
}
+ public void setDropPending(boolean pending) {
+ mDropPending = pending;
+ }
+
+ public boolean isDropPending() {
+ return mDropPending;
+ }
+
private void invalidateBubbleTextView(BubbleTextView icon) {
final int padding = icon.getPressedOrFocusedBackgroundPadding();
invalidate(icon.getLeft() + getPaddingLeft() - padding,
diff --git a/src/com/android/launcher3/Cling.java b/src/com/android/launcher3/Cling.java
index 338b722..9974acd 100644
--- a/src/com/android/launcher3/Cling.java
+++ b/src/com/android/launcher3/Cling.java
@@ -147,7 +147,7 @@
pos.left + Utilities.sIconTextureWidth,
pos.top + Utilities.sIconTextureHeight);
Utilities.scaleRectAboutCenter(mFocusedHotseatAppBounds,
- (grid.hotseatIconSize / grid.iconSize));
+ ((float) grid.hotseatIconSizePx / grid.iconSizePx));
// Set the title
TextView v = (TextView) findViewById(R.id.focused_hotseat_app_title);
diff --git a/src/com/android/launcher3/DragController.java b/src/com/android/launcher3/DragController.java
index 5b5c35c..5e733f0 100644
--- a/src/com/android/launcher3/DragController.java
+++ b/src/com/android/launcher3/DragController.java
@@ -16,6 +16,7 @@
package com.android.launcher3;
+import android.content.ComponentName;
import android.content.Context;
import android.content.res.Resources;
import android.graphics.Bitmap;
@@ -25,14 +26,8 @@
import android.os.Handler;
import android.os.IBinder;
import android.util.Log;
-import android.view.HapticFeedbackConstants;
-import android.view.KeyEvent;
-import android.view.MotionEvent;
-import android.view.VelocityTracker;
-import android.view.View;
-import android.view.ViewConfiguration;
+import android.view.*;
import android.view.inputmethod.InputMethodManager;
-
import com.android.launcher3.R;
import java.util.ArrayList;
@@ -323,7 +318,7 @@
}
endDrag();
}
- public void onAppsRemoved(ArrayList<AppInfo> appInfos, Context context) {
+ public void onAppsRemoved(final ArrayList<String> packageNames, ArrayList<AppInfo> appInfos) {
// Cancel the current drag if we are removing an app that we are dragging
if (mDragObject != null) {
Object rawDragInfo = mDragObject.dragInfo;
@@ -333,8 +328,9 @@
// Added null checks to prevent NPE we've seen in the wild
if (dragInfo != null &&
dragInfo.intent != null) {
- boolean isSameComponent =
- dragInfo.intent.getComponent().equals(info.componentName);
+ ComponentName cn = dragInfo.intent.getComponent();
+ boolean isSameComponent = cn.equals(info.componentName) ||
+ packageNames.contains(cn.getPackageName());
if (isSameComponent) {
cancelDrag();
return;
diff --git a/src/com/android/launcher3/DragLayer.java b/src/com/android/launcher3/DragLayer.java
index 89f8275..159d7d9 100644
--- a/src/com/android/launcher3/DragLayer.java
+++ b/src/com/android/launcher3/DragLayer.java
@@ -480,7 +480,7 @@
}
public void animateViewIntoPosition(DragView dragView, final View child) {
- animateViewIntoPosition(dragView, child, null);
+ animateViewIntoPosition(dragView, child, null, null);
}
public void animateViewIntoPosition(DragView dragView, final int[] pos, float alpha,
@@ -496,8 +496,8 @@
}
public void animateViewIntoPosition(DragView dragView, final View child,
- final Runnable onFinishAnimationRunnable) {
- animateViewIntoPosition(dragView, child, -1, onFinishAnimationRunnable, null);
+ final Runnable onFinishAnimationRunnable, View anchorView) {
+ animateViewIntoPosition(dragView, child, -1, onFinishAnimationRunnable, anchorView);
}
public void animateViewIntoPosition(DragView dragView, final View child, int duration,
@@ -645,8 +645,10 @@
int x = (int) (fromLeft + Math.round(((to.left - fromLeft) * motionPercent)));
int y = (int) (fromTop + Math.round(((to.top - fromTop) * motionPercent)));
- int xPos = x - mDropView.getScrollX() + (mAnchorView != null
- ? (mAnchorViewInitialScrollX - mAnchorView.getScrollX()) : 0);
+ int anchorAdjust = mAnchorView == null ? 0 : (int) (mAnchorView.getScaleX() *
+ (mAnchorViewInitialScrollX - mAnchorView.getScrollX()));
+
+ int xPos = x - mDropView.getScrollX() + anchorAdjust;
int yPos = y - mDropView.getScrollY();
mDropView.setTranslationX(xPos);
diff --git a/src/com/android/launcher3/DrawableTileSource.java b/src/com/android/launcher3/DrawableTileSource.java
new file mode 100644
index 0000000..c1f2eff
--- /dev/null
+++ b/src/com/android/launcher3/DrawableTileSource.java
@@ -0,0 +1,102 @@
+/*
+ * Copyright (C) 2013 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.launcher3;
+
+import android.content.Context;
+import android.graphics.Bitmap;
+import android.graphics.Canvas;
+import android.graphics.Rect;
+import android.graphics.drawable.Drawable;
+
+import com.android.gallery3d.glrenderer.BasicTexture;
+import com.android.gallery3d.glrenderer.BitmapTexture;
+import com.android.photos.views.TiledImageRenderer;
+
+public class DrawableTileSource implements TiledImageRenderer.TileSource {
+ private static final int GL_SIZE_LIMIT = 2048;
+ // This must be no larger than half the size of the GL_SIZE_LIMIT
+ // due to decodePreview being allowed to be up to 2x the size of the target
+ public static final int MAX_PREVIEW_SIZE = GL_SIZE_LIMIT / 2;
+
+ private int mTileSize;
+ private int mPreviewSize;
+ private Drawable mDrawable;
+ private BitmapTexture mPreview;
+
+ public DrawableTileSource(Context context, Drawable d, int previewSize) {
+ mTileSize = TiledImageRenderer.suggestedTileSize(context);
+ mDrawable = d;
+ mPreviewSize = Math.min(previewSize, MAX_PREVIEW_SIZE);
+ }
+
+ @Override
+ public int getTileSize() {
+ return mTileSize;
+ }
+
+ @Override
+ public int getImageWidth() {
+ return mDrawable.getIntrinsicWidth();
+ }
+
+ @Override
+ public int getImageHeight() {
+ return mDrawable.getIntrinsicHeight();
+ }
+
+ @Override
+ public int getRotation() {
+ return 0;
+ }
+
+ @Override
+ public BasicTexture getPreview() {
+ if (mPreviewSize == 0) {
+ return null;
+ }
+ if (mPreview == null){
+ float width = getImageWidth();
+ float height = getImageHeight();
+ while (width > MAX_PREVIEW_SIZE || height > MAX_PREVIEW_SIZE) {
+ width /= 2;
+ height /= 2;
+ }
+ Bitmap b = Bitmap.createBitmap((int) width, (int) height, Bitmap.Config.ARGB_8888);
+ Canvas c = new Canvas(b);
+ mDrawable.setBounds(new Rect(0, 0, (int) width, (int) height));
+ mDrawable.draw(c);
+ c.setBitmap(null);
+ mPreview = new BitmapTexture(b);
+ }
+ return mPreview;
+ }
+
+ @Override
+ public Bitmap getTile(int level, int x, int y, Bitmap bitmap) {
+ int tileSize = getTileSize();
+ if (bitmap == null) {
+ bitmap = Bitmap.createBitmap(tileSize, tileSize, Bitmap.Config.ARGB_8888);
+ }
+ Canvas c = new Canvas(bitmap);
+ Rect bounds = new Rect(0, 0, getImageWidth(), getImageHeight());
+ bounds.offset(-x, -y);
+ mDrawable.setBounds(bounds);
+ mDrawable.draw(c);
+ c.setBitmap(null);
+ return bitmap;
+ }
+}
diff --git a/src/com/android/launcher3/DynamicGrid.java b/src/com/android/launcher3/DynamicGrid.java
index 4776c86..9b3b193 100644
--- a/src/com/android/launcher3/DynamicGrid.java
+++ b/src/com/android/launcher3/DynamicGrid.java
@@ -23,13 +23,17 @@
import android.content.res.Resources;
import android.graphics.Paint;
import android.graphics.Paint.FontMetrics;
+import android.graphics.Point;
import android.graphics.PointF;
import android.graphics.Rect;
import android.util.DisplayMetrics;
import android.util.TypedValue;
+import android.view.Display;
import android.view.Gravity;
+import android.view.Surface;
import android.view.View;
import android.view.ViewGroup.LayoutParams;
+import android.view.WindowManager;
import android.widget.FrameLayout;
import java.util.ArrayList;
@@ -52,15 +56,20 @@
}
class DeviceProfile {
+ public static interface DeviceProfileCallbacks {
+ public void onAvailableSizeChanged(DeviceProfile grid);
+ }
+
String name;
float minWidthDps;
float minHeightDps;
float numRows;
float numColumns;
- float iconSize;
- float iconTextSize;
float numHotseatIcons;
- float hotseatIconSize;
+ private float iconSize;
+ private float iconTextSize;
+ private int iconDrawablePaddingOriginalPx;
+ private float hotseatIconSize;
boolean isLandscape;
boolean isTablet;
@@ -75,10 +84,18 @@
int heightPx;
int availableWidthPx;
int availableHeightPx;
+ int defaultPageSpacingPx;
+
int iconSizePx;
int iconTextSizePx;
+ int iconDrawablePaddingPx;
int cellWidthPx;
int cellHeightPx;
+ int allAppsIconSizePx;
+ int allAppsIconTextSizePx;
+ int allAppsCellWidthPx;
+ int allAppsCellHeightPx;
+ int allAppsCellPaddingPx;
int folderBackgroundOffset;
int folderIconSizePx;
int folderCellWidthPx;
@@ -96,6 +113,8 @@
int searchBarHeightPx;
int pageIndicatorHeightPx;
+ private ArrayList<DeviceProfileCallbacks> mCallbacks = new ArrayList<DeviceProfileCallbacks>();
+
DeviceProfile(String n, float w, float h, float r, float c,
float is, float its, float hs, float his) {
// Ensure that we have an odd number of hotseat items (since we need to place all apps)
@@ -119,21 +138,26 @@
float minWidth, float minHeight,
int wPx, int hPx,
int awPx, int ahPx,
- Resources resources) {
- DisplayMetrics dm = resources.getDisplayMetrics();
+ Resources res) {
+ DisplayMetrics dm = res.getDisplayMetrics();
ArrayList<DeviceProfileQuery> points =
new ArrayList<DeviceProfileQuery>();
transposeLayoutWithOrientation =
- resources.getBoolean(R.bool.hotseat_transpose_layout_with_orientation);
+ res.getBoolean(R.bool.hotseat_transpose_layout_with_orientation);
minWidthDps = minWidth;
minHeightDps = minHeight;
ComponentName cn = new ComponentName(context.getPackageName(),
this.getClass().getName());
defaultWidgetPadding = AppWidgetHostView.getDefaultPaddingForWidget(context, cn, null);
- edgeMarginPx = resources.getDimensionPixelSize(R.dimen.dynamic_grid_edge_margin);
+ edgeMarginPx = res.getDimensionPixelSize(R.dimen.dynamic_grid_edge_margin);
desiredWorkspaceLeftRightMarginPx = 2 * edgeMarginPx;
- pageIndicatorHeightPx = resources.getDimensionPixelSize(R.dimen.dynamic_grid_page_indicator_height);
+ pageIndicatorHeightPx =
+ res.getDimensionPixelSize(R.dimen.dynamic_grid_page_indicator_height);
+ defaultPageSpacingPx =
+ res.getDimensionPixelSize(R.dimen.dynamic_grid_workspace_page_spacing);
+ allAppsCellPaddingPx =
+ res.getDimensionPixelSize(R.dimen.dynamic_grid_all_apps_cell_padding);
// Interpolate the rows
for (DeviceProfile p : profiles) {
@@ -146,13 +170,22 @@
points.add(new DeviceProfileQuery(p.minWidthDps, p.minHeightDps, p.numColumns));
}
numColumns = Math.round(invDistWeightedInterpolate(minWidth, minHeight, points));
+ // Interpolate the hotseat length
+ points.clear();
+ for (DeviceProfile p : profiles) {
+ points.add(new DeviceProfileQuery(p.minWidthDps, p.minHeightDps, p.numHotseatIcons));
+ }
+ numHotseatIcons = Math.round(invDistWeightedInterpolate(minWidth, minHeight, points));
+ hotseatAllAppsRank = (int) (numHotseatIcons / 2);
+
// Interpolate the icon size
points.clear();
for (DeviceProfile p : profiles) {
points.add(new DeviceProfileQuery(p.minWidthDps, p.minHeightDps, p.iconSize));
}
iconSize = invDistWeightedInterpolate(minWidth, minHeight, points);
- iconSizePx = DynamicGrid.pxFromDp(iconSize, dm);
+ // AllApps uses the original non-scaled icon size
+ allAppsIconSizePx = DynamicGrid.pxFromDp(iconSize, dm);
// Interpolate the icon text size
points.clear();
@@ -160,14 +193,11 @@
points.add(new DeviceProfileQuery(p.minWidthDps, p.minHeightDps, p.iconTextSize));
}
iconTextSize = invDistWeightedInterpolate(minWidth, minHeight, points);
- iconTextSizePx = DynamicGrid.pxFromSp(iconTextSize, dm);
+ iconDrawablePaddingOriginalPx =
+ res.getDimensionPixelSize(R.dimen.dynamic_grid_icon_drawable_padding);
+ // AllApps uses the original non-scaled icon text size
+ allAppsIconTextSizePx = DynamicGrid.pxFromDp(iconTextSize, dm);
- // Interpolate the hotseat size
- points.clear();
- for (DeviceProfile p : profiles) {
- points.add(new DeviceProfileQuery(p.minWidthDps, p.minHeightDps, p.numHotseatIcons));
- }
- numHotseatIcons = Math.round(invDistWeightedInterpolate(minWidth, minHeight, points));
// Interpolate the hotseat icon size
points.clear();
for (DeviceProfile p : profiles) {
@@ -175,11 +205,91 @@
}
// Hotseat
hotseatIconSize = invDistWeightedInterpolate(minWidth, minHeight, points);
- hotseatIconSizePx = DynamicGrid.pxFromDp(hotseatIconSize, dm);
- hotseatAllAppsRank = (int) (numColumns / 2);
- // Calculate other vars based on Configuration
- updateFromConfiguration(resources, wPx, hPx, awPx, ahPx);
+ // Calculate the remaining vars
+ updateFromConfiguration(context, res, wPx, hPx, awPx, ahPx);
+ updateAvailableDimensions(context);
+ }
+
+ void addCallback(DeviceProfileCallbacks cb) {
+ mCallbacks.add(cb);
+ cb.onAvailableSizeChanged(this);
+ }
+ void removeCallback(DeviceProfileCallbacks cb) {
+ mCallbacks.remove(cb);
+ }
+
+ private int getDeviceOrientation(Context context) {
+ WindowManager windowManager = (WindowManager)
+ context.getSystemService(Context.WINDOW_SERVICE);
+ Resources resources = context.getResources();
+ DisplayMetrics dm = resources.getDisplayMetrics();
+ Configuration config = resources.getConfiguration();
+ int rotation = windowManager.getDefaultDisplay().getRotation();
+
+ boolean isLandscape = (config.orientation == Configuration.ORIENTATION_LANDSCAPE) &&
+ (rotation == Surface.ROTATION_0 || rotation == Surface.ROTATION_180);
+ boolean isRotatedPortrait = (config.orientation == Configuration.ORIENTATION_PORTRAIT) &&
+ (rotation == Surface.ROTATION_90 || rotation == Surface.ROTATION_270);
+ if (isLandscape || isRotatedPortrait) {
+ return CellLayout.LANDSCAPE;
+ } else {
+ return CellLayout.PORTRAIT;
+ }
+ }
+
+ private void updateAvailableDimensions(Context context) {
+ WindowManager windowManager = (WindowManager)
+ context.getSystemService(Context.WINDOW_SERVICE);
+ Display display = windowManager.getDefaultDisplay();
+ Resources resources = context.getResources();
+ DisplayMetrics dm = resources.getDisplayMetrics();
+ Configuration config = resources.getConfiguration();
+
+ // There are three possible configurations that the dynamic grid accounts for, portrait,
+ // landscape with the nav bar at the bottom, and landscape with the nav bar at the side.
+ // To prevent waiting for fitSystemWindows(), we make the observation that in landscape,
+ // the height is the smallest height (either with the nav bar at the bottom or to the
+ // side) and otherwise, the height is simply the largest possible height for a portrait
+ // device.
+ Point size = new Point();
+ Point smallestSize = new Point();
+ Point largestSize = new Point();
+ display.getSize(size);
+ display.getCurrentSizeRange(smallestSize, largestSize);
+ availableWidthPx = size.x;
+ if (config.orientation == Configuration.ORIENTATION_LANDSCAPE) {
+ availableHeightPx = smallestSize.y;
+ } else {
+ availableHeightPx = largestSize.y;
+ }
+
+ // Check to see if the icons fit in the new available height. If not, then we need to
+ // shrink the icon size.
+ Rect workspacePadding = getWorkspacePadding();
+ float scale = 1f;
+ int drawablePadding = iconDrawablePaddingOriginalPx;
+ updateIconSize(1f, drawablePadding, resources, dm);
+ float usedHeight = (cellHeightPx * numRows);
+ int maxHeight = (availableHeightPx - workspacePadding.top - workspacePadding.bottom);
+ if (usedHeight > maxHeight) {
+ scale = maxHeight / usedHeight;
+ drawablePadding = 0;
+ }
+ updateIconSize(scale, drawablePadding, resources, dm);
+
+ // Make the callbacks
+ for (DeviceProfileCallbacks cb : mCallbacks) {
+ cb.onAvailableSizeChanged(this);
+ }
+ }
+
+ private void updateIconSize(float scale, int drawablePadding, Resources resources,
+ DisplayMetrics dm) {
+ iconSizePx = (int) (DynamicGrid.pxFromDp(iconSize, dm) * scale);
+ iconTextSizePx = (int) (DynamicGrid.pxFromSp(iconTextSize, dm) * scale);
+ iconDrawablePaddingPx = drawablePadding;
+ hotseatIconSizePx = (int) (DynamicGrid.pxFromDp(hotseatIconSize, dm) * scale);
// Search Bar
searchBarSpaceMaxWidthPx = resources.getDimensionPixelSize(R.dimen.dynamic_grid_search_bar_max_width);
@@ -192,23 +302,7 @@
textPaint.setTextSize(iconTextSizePx);
FontMetrics fm = textPaint.getFontMetrics();
cellWidthPx = iconSizePx;
- cellHeightPx = iconSizePx + (int) Math.ceil(fm.bottom - fm.top);
-
- // At this point, if the cells do not fit into the available height, then we need
- // to shrink the icon size
- /*
- Rect padding = getWorkspacePadding(isLandscape ?
- CellLayout.LANDSCAPE : CellLayout.PORTRAIT);
- int h = (int) (numRows * cellHeightPx) + padding.top + padding.bottom;
- if (h > availableHeightPx) {
- float delta = h - availableHeightPx;
- int deltaPx = (int) Math.ceil(delta / numRows);
- iconSizePx -= deltaPx;
- iconSize = DynamicGrid.dpiFromPx(iconSizePx, dm);
- cellWidthPx = iconSizePx;
- cellHeightPx = iconSizePx + (int) Math.ceil(fm.bottom - fm.top);
- }
- */
+ cellHeightPx = iconSizePx + iconDrawablePaddingPx + (int) Math.ceil(fm.bottom - fm.top);
// Hotseat
hotseatBarHeightPx = iconSizePx + 4 * edgeMarginPx;
@@ -217,12 +311,35 @@
// Folder
folderCellWidthPx = cellWidthPx + 3 * edgeMarginPx;
- folderCellHeightPx = cellHeightPx + (int) ((3f/2f) * edgeMarginPx);
+ folderCellHeightPx = cellHeightPx + edgeMarginPx;
folderBackgroundOffset = -edgeMarginPx;
folderIconSizePx = iconSizePx + 2 * -folderBackgroundOffset;
+
+ // All Apps
+ Rect padding = getWorkspacePadding(isLandscape ?
+ CellLayout.LANDSCAPE : CellLayout.PORTRAIT);
+ int pageIndicatorOffset =
+ resources.getDimensionPixelSize(R.dimen.apps_customize_page_indicator_offset);
+ allAppsCellWidthPx = allAppsIconSizePx;
+ allAppsCellHeightPx = allAppsIconSizePx + drawablePadding + iconTextSizePx;
+ int maxLongEdgeCellCount =
+ resources.getInteger(R.integer.config_dynamic_grid_max_long_edge_cell_count);
+ int maxShortEdgeCellCount =
+ resources.getInteger(R.integer.config_dynamic_grid_max_short_edge_cell_count);
+ int minEdgeCellCount =
+ resources.getInteger(R.integer.config_dynamic_grid_min_edge_cell_count);
+ int maxRows = (isLandscape ? maxShortEdgeCellCount : maxLongEdgeCellCount);
+ int maxCols = (isLandscape ? maxLongEdgeCellCount : maxShortEdgeCellCount);
+
+ allAppsNumRows = (availableHeightPx - pageIndicatorHeightPx) /
+ (allAppsCellHeightPx + allAppsCellPaddingPx);
+ allAppsNumRows = Math.max(minEdgeCellCount, Math.min(maxRows, allAppsNumRows));
+ allAppsNumCols = (availableWidthPx) /
+ (allAppsCellWidthPx + allAppsCellPaddingPx);
+ allAppsNumCols = Math.max(minEdgeCellCount, Math.min(maxCols, allAppsNumCols));
}
- void updateFromConfiguration(Resources resources, int wPx, int hPx,
+ void updateFromConfiguration(Context context, Resources resources, int wPx, int hPx,
int awPx, int ahPx) {
isLandscape = (resources.getConfiguration().orientation ==
Configuration.ORIENTATION_LANDSCAPE);
@@ -233,18 +350,7 @@
availableWidthPx = awPx;
availableHeightPx = ahPx;
- Rect padding = getWorkspacePadding(isLandscape ?
- CellLayout.LANDSCAPE : CellLayout.PORTRAIT);
- int pageIndicatorOffset =
- resources.getDimensionPixelSize(R.dimen.apps_customize_page_indicator_offset);
- if (isLandscape) {
- allAppsNumRows = (availableHeightPx - pageIndicatorOffset - 4 * edgeMarginPx) /
- (iconSizePx + iconTextSizePx + 2 * edgeMarginPx);
- } else {
- allAppsNumRows = (int) numRows + 1;
- }
- allAppsNumCols = (availableWidthPx - padding.left - padding.right - 2 * edgeMarginPx) /
- (iconSizePx + 2 * edgeMarginPx);
+ updateAvailableDimensions(context);
}
private float dist(PointF p0, PointF p1) {
@@ -298,6 +404,10 @@
return sum;
}
+ Rect getWorkspacePadding() {
+ return getWorkspacePadding(isLandscape ? CellLayout.LANDSCAPE : CellLayout.PORTRAIT);
+ }
+
Rect getWorkspacePadding(int orientation) {
Rect padding = new Rect();
if (orientation == CellLayout.LANDSCAPE &&
@@ -331,6 +441,19 @@
return padding;
}
+ int getWorkspacePageSpacing(int orientation) {
+ if (orientation == CellLayout.LANDSCAPE &&
+ transposeLayoutWithOrientation) {
+ // In landscape mode the page spacing is set to the default.
+ return defaultPageSpacingPx;
+ } else {
+ // In portrait, we want the pages spaced such that there is no
+ // overhang of the previous / next page into the current page viewport.
+ // We assume symmetrical padding in portrait mode.
+ return getWorkspacePadding().left;
+ }
+ }
+
// The rect returned will be extended to below the system ui that covers the workspace
Rect getHotseatRect() {
if (isVerticalBarLayout()) {
@@ -363,6 +486,10 @@
return isLandscape && transposeLayoutWithOrientation;
}
+ boolean shouldFadeAdjacentWorkspaceScreens() {
+ return isVerticalBarLayout() || isLargeTablet();
+ }
+
public void layout(Launcher launcher) {
FrameLayout.LayoutParams lp;
Resources res = launcher.getResources();
@@ -413,15 +540,14 @@
}
// Layout the workspace
- View workspace = launcher.findViewById(R.id.workspace);
+ PagedView workspace = (PagedView) launcher.findViewById(R.id.workspace);
lp = (FrameLayout.LayoutParams) workspace.getLayoutParams();
lp.gravity = Gravity.CENTER;
- Rect padding = getWorkspacePadding(isLandscape
- ? CellLayout.LANDSCAPE
- : CellLayout.PORTRAIT);
- workspace.setPadding(padding.left, padding.top,
- padding.right, padding.bottom);
+ int orientation = isLandscape ? CellLayout.LANDSCAPE : CellLayout.PORTRAIT;
+ Rect padding = getWorkspacePadding(orientation);
workspace.setLayoutParams(lp);
+ workspace.setPadding(padding.left, padding.top, padding.right, padding.bottom);
+ workspace.setPageSpacing(getWorkspacePageSpacing(orientation));
// Layout the hotseat
View hotseat = launcher.findViewById(R.id.hotseat);
@@ -431,8 +557,7 @@
lp.gravity = Gravity.RIGHT;
lp.width = hotseatBarHeightPx;
lp.height = LayoutParams.MATCH_PARENT;
- hotseat.setPadding(0, 2 * edgeMarginPx,
- 2 * edgeMarginPx, 2 * edgeMarginPx);
+ hotseat.findViewById(R.id.layout).setPadding(0, 2 * edgeMarginPx, 0, 2 * edgeMarginPx);
} else if (isTablet()) {
// Pad the hotseat with the grid gap calculated above
int gridGap = (int) ((widthPx - 2 * edgeMarginPx -
@@ -475,6 +600,45 @@
pageIndicator.setLayoutParams(lp);
}
}
+
+ AppsCustomizeTabHost host = (AppsCustomizeTabHost)
+ launcher.findViewById(R.id.apps_customize_pane);
+ if (host != null) {
+ // Center the all apps page indicator
+ int pageIndicatorHeight = (int) (pageIndicatorHeightPx * Math.min(1f,
+ (allAppsIconSizePx / DynamicGrid.DEFAULT_ICON_SIZE_PX)));
+ pageIndicator = host.findViewById(R.id.apps_customize_page_indicator);
+ if (pageIndicator != null) {
+ lp = (FrameLayout.LayoutParams) pageIndicator.getLayoutParams();
+ lp.gravity = Gravity.CENTER_HORIZONTAL | Gravity.BOTTOM;
+ lp.width = LayoutParams.WRAP_CONTENT;
+ lp.height = pageIndicatorHeight;
+ pageIndicator.setLayoutParams(lp);
+ }
+
+ AppsCustomizePagedView pagedView = (AppsCustomizePagedView)
+ host.findViewById(R.id.apps_customize_pane_content);
+ padding = new Rect();
+ if (pagedView != null) {
+ // Constrain the dimensions of all apps so that it does not span the full width
+ int paddingLR = (availableWidthPx - (allAppsCellWidthPx * allAppsNumCols)) /
+ (2 * (allAppsNumCols + 1));
+ int paddingTB = (availableHeightPx - (allAppsCellHeightPx * allAppsNumRows)) /
+ (2 * (allAppsNumRows + 1));
+ paddingLR = Math.min(paddingLR, (int)((paddingLR + paddingTB) * 0.75f));
+ paddingTB = Math.min(paddingTB, (int)((paddingLR + paddingTB) * 0.75f));
+ int maxAllAppsWidth = (allAppsNumCols * (allAppsCellWidthPx + 2 * paddingLR));
+ int gridPaddingLR = (availableWidthPx - maxAllAppsWidth) / 2;
+ if (gridPaddingLR > (allAppsCellWidthPx / 4)) {
+ padding.left = padding.right = gridPaddingLR;
+ }
+ // The icons are centered, so we can't just offset by the page indicator height
+ // because the empty space will actually be pageIndicatorHeight + paddingTB
+ padding.bottom = Math.max(0, pageIndicatorHeight - paddingTB);
+ pagedView.setAllAppsPadding(padding);
+ pagedView.setWidgetsPageIndicatorPadding(pageIndicatorHeight);
+ }
+ }
}
}
@@ -486,6 +650,10 @@
private float mMinWidth;
private float mMinHeight;
+ // This is a static that we use for the default icon size on a 4/5-inch phone
+ static float DEFAULT_ICON_SIZE_DP = 60;
+ static float DEFAULT_ICON_SIZE_PX = 0;
+
public static float dpiFromPx(int size, DisplayMetrics metrics){
float densityRatio = (float) metrics.densityDpi / DisplayMetrics.DENSITY_DEFAULT;
return (size / densityRatio);
@@ -507,6 +675,7 @@
ArrayList<DeviceProfile> deviceProfiles =
new ArrayList<DeviceProfile>();
boolean hasAA = !AppsCustomizePagedView.DISABLE_ALL_APPS;
+ DEFAULT_ICON_SIZE_PX = pxFromDp(DEFAULT_ICON_SIZE_DP, dm);
// Our phone profiles include the bar sizes in each orientation
deviceProfiles.add(new DeviceProfile("Super Short Stubby",
255, 300, 2, 3, 48, 13, (hasAA ? 5 : 4), 48));
@@ -519,7 +688,7 @@
deviceProfiles.add(new DeviceProfile("Nexus S",
296, 491.33f, 4, 4, 48, 13, (hasAA ? 5 : 4), 48));
deviceProfiles.add(new DeviceProfile("Nexus 4",
- 359, 518, 4, 4, 60, 13, (hasAA ? 5 : 4), 56));
+ 359, 518, 4, 4, DEFAULT_ICON_SIZE_DP, 13, (hasAA ? 5 : 4), 56));
// The tablet profile is odd in that the landscape orientation
// also includes the nav bar on the side
deviceProfiles.add(new DeviceProfile("Nexus 7",
@@ -553,7 +722,7 @@
"Wd: " + mProfile.minWidthDps + ", Hd: " + mProfile.minHeightDps +
", W: " + mProfile.widthPx + ", H: " + mProfile.heightPx +
" [r: " + mProfile.numRows + ", c: " + mProfile.numColumns +
- ", is: " + mProfile.iconSizePx + ", its: " + mProfile.iconTextSize +
+ ", is: " + mProfile.iconSizePx + ", its: " + mProfile.iconTextSizePx +
", cw: " + mProfile.cellWidthPx + ", ch: " + mProfile.cellHeightPx +
", hc: " + mProfile.numHotseatIcons + ", his: " + mProfile.hotseatIconSizePx + "]";
}
diff --git a/src/com/android/launcher3/FastBitmapDrawable.java b/src/com/android/launcher3/FastBitmapDrawable.java
index 14760c7..bce6707 100644
--- a/src/com/android/launcher3/FastBitmapDrawable.java
+++ b/src/com/android/launcher3/FastBitmapDrawable.java
@@ -67,6 +67,7 @@
public void setFilterBitmap(boolean filterBitmap) {
mPaint.setFilterBitmap(filterBitmap);
+ mPaint.setAntiAlias(filterBitmap);
}
public int getAlpha() {
diff --git a/src/com/android/launcher3/Folder.java b/src/com/android/launcher3/Folder.java
index 69d9a3d..bd61010 100644
--- a/src/com/android/launcher3/Folder.java
+++ b/src/com/android/launcher3/Folder.java
@@ -538,6 +538,7 @@
textView.setTag(item);
textView.setTextColor(getResources().getColor(R.color.folder_items_text_color));
textView.setShadowsEnabled(false);
+ textView.setGlowColor(getResources().getColor(R.color.folder_items_glow_color));
textView.setOnClickListener(this);
textView.setOnLongClickListener(this);
@@ -956,9 +957,7 @@
Rect workspacePadding = grid.getWorkspacePadding(grid.isLandscape ?
CellLayout.LANDSCAPE : CellLayout.PORTRAIT);
int maxContentAreaHeight = grid.availableHeightPx -
- 4 * grid.edgeMarginPx -
workspacePadding.top - workspacePadding.bottom -
- getPaddingTop() - getPaddingBottom() -
mFolderNameHeight;
return Math.min(maxContentAreaHeight,
mContent.getDesiredHeight());
diff --git a/src/com/android/launcher3/FolderIcon.java b/src/com/android/launcher3/FolderIcon.java
index cd1ff2c..5e461a7 100644
--- a/src/com/android/launcher3/FolderIcon.java
+++ b/src/com/android/launcher3/FolderIcon.java
@@ -37,7 +37,7 @@
import android.view.animation.AccelerateInterpolator;
import android.view.animation.DecelerateInterpolator;
import android.widget.ImageView;
-import android.widget.LinearLayout;
+import android.widget.FrameLayout;
import android.widget.TextView;
import com.android.launcher3.R;
@@ -49,7 +49,7 @@
/**
* An icon that can appear on in the workspace representing an {@link UserFolder}.
*/
-public class FolderIcon extends LinearLayout implements FolderListener {
+public class FolderIcon extends FrameLayout implements FolderListener {
private Launcher mLauncher;
private Folder mFolder;
private FolderInfo mInfo;
@@ -134,17 +134,20 @@
"INITIAL_ITEM_ANIMATION_DURATION, as sequencing of adding first two items " +
"is dependent on this");
}
+ LauncherAppState app = LauncherAppState.getInstance();
+ DeviceProfile grid = app.getDynamicGrid().getDeviceProfile();
FolderIcon icon = (FolderIcon) LayoutInflater.from(launcher).inflate(resId, group, false);
icon.setClipToPadding(false);
icon.mFolderName = (BubbleTextView) icon.findViewById(R.id.folder_icon_name);
icon.mFolderName.setText(folderInfo.title);
- icon.mPreviewBackground = (ImageView) icon.findViewById(R.id.preview_background);
- LauncherAppState app = LauncherAppState.getInstance();
- DeviceProfile grid = app.getDynamicGrid().getDeviceProfile();
+ icon.mFolderName.setCompoundDrawablePadding(0);
+ FrameLayout.LayoutParams lp = (FrameLayout.LayoutParams) icon.mFolderName.getLayoutParams();
+ lp.topMargin = grid.iconSizePx + grid.iconDrawablePaddingPx;
+
// Offset the preview background to center this view accordingly
- LinearLayout.LayoutParams lp =
- (LinearLayout.LayoutParams) icon.mPreviewBackground.getLayoutParams();
+ icon.mPreviewBackground = (ImageView) icon.findViewById(R.id.preview_background);
+ lp = (FrameLayout.LayoutParams) icon.mPreviewBackground.getLayoutParams();
lp.topMargin = grid.folderBackgroundOffset;
lp.width = grid.folderIconSizePx;
lp.height = grid.folderIconSizePx;
@@ -537,12 +540,10 @@
if (d != null) {
mOldBounds.set(d.getBounds());
d.setBounds(0, 0, mIntrinsicIconSize, mIntrinsicIconSize);
- d.setFilterBitmap(true);
d.setColorFilter(Color.argb(params.overlayAlpha, 255, 255, 255),
PorterDuff.Mode.SRC_ATOP);
d.draw(canvas);
d.clearColorFilter();
- d.setFilterBitmap(false);
d.setBounds(mOldBounds);
}
canvas.restore();
diff --git a/src/com/android/launcher3/IconCache.java b/src/com/android/launcher3/IconCache.java
index 543b8ee..a55fce0 100644
--- a/src/com/android/launcher3/IconCache.java
+++ b/src/com/android/launcher3/IconCache.java
@@ -156,7 +156,7 @@
Iterator<Entry<ComponentName, CacheEntry>> it = mCache.entrySet().iterator();
while (it.hasNext()) {
final CacheEntry e = it.next().getValue();
- if (e.icon.getWidth() != grid.iconSizePx || e.icon.getHeight() != grid.iconSizePx) {
+ if (e.icon.getWidth() < grid.iconSizePx || e.icon.getHeight() < grid.iconSizePx) {
it.remove();
}
}
diff --git a/src/com/android/launcher3/InstallShortcutReceiver.java b/src/com/android/launcher3/InstallShortcutReceiver.java
index 7df73b1..835c472 100644
--- a/src/com/android/launcher3/InstallShortcutReceiver.java
+++ b/src/com/android/launcher3/InstallShortcutReceiver.java
@@ -108,6 +108,9 @@
public static void removeFromInstallQueue(SharedPreferences sharedPrefs,
ArrayList<String> packageNames) {
+ if (packageNames.isEmpty()) {
+ return;
+ }
synchronized(sLock) {
Set<String> strings = sharedPrefs.getStringSet(APPS_PENDING_INSTALL, null);
if (DBG) {
@@ -220,16 +223,8 @@
}
// This name is only used for comparisons and notifications, so fall back to activity name
// if not supplied
- String name = data.getStringExtra(Intent.EXTRA_SHORTCUT_NAME);
- if (name == null) {
- try {
- PackageManager pm = context.getPackageManager();
- ActivityInfo info = pm.getActivityInfo(intent.getComponent(), 0);
- name = info.loadLabel(pm).toString();
- } catch (PackageManager.NameNotFoundException nnfe) {
- return;
- }
- }
+ String name = ensureValidName(context, intent,
+ data.getStringExtra(Intent.EXTRA_SHORTCUT_NAME)).toString();
Bitmap icon = data.getParcelableExtra(Intent.EXTRA_SHORTCUT_ICON);
Intent.ShortcutIconResource iconResource =
data.getParcelableExtra(Intent.EXTRA_SHORTCUT_ICON_RESOURCE);
@@ -315,6 +310,25 @@
Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED);
}
LauncherAppState app = LauncherAppState.getInstance();
- return app.getModel().infoFromShortcutIntent(context, data, null);
+ ShortcutInfo info = app.getModel().infoFromShortcutIntent(context, data, null);
+ info.title = ensureValidName(context, launchIntent, info.title);
+ return info;
+ }
+
+ /**
+ * Ensures that we have a valid, non-null name. If the provided name is null, we will return
+ * the application name instead.
+ */
+ private static CharSequence ensureValidName(Context context, Intent intent, CharSequence name) {
+ if (name == null) {
+ try {
+ PackageManager pm = context.getPackageManager();
+ ActivityInfo info = pm.getActivityInfo(intent.getComponent(), 0);
+ name = info.loadLabel(pm).toString();
+ } catch (PackageManager.NameNotFoundException nnfe) {
+ return "";
+ }
+ }
+ return name;
}
}
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java
index b0e4968..0637b24 100644
--- a/src/com/android/launcher3/Launcher.java
+++ b/src/com/android/launcher3/Launcher.java
@@ -181,6 +181,8 @@
private static final String RUNTIME_STATE_PENDING_ADD_SPAN_Y = "launcher.add_span_y";
// Type: parcelable
private static final String RUNTIME_STATE_PENDING_ADD_WIDGET_INFO = "launcher.add_widget_info";
+ // Type: parcelable
+ private static final String RUNTIME_STATE_PENDING_ADD_WIDGET_ID = "launcher.add_widget_id";
private static final String TOOLBAR_ICON_METADATA_NAME = "com.android.launcher.toolbar_icon";
private static final String TOOLBAR_SEARCH_ICON_METADATA_NAME =
@@ -197,8 +199,8 @@
private AnimatorSet mStateAnimation;
static final int APPWIDGET_HOST_ID = 1024;
- private static final int EXIT_SPRINGLOADED_MODE_SHORT_TIMEOUT = 300;
- private static final int EXIT_SPRINGLOADED_MODE_LONG_TIMEOUT = 600;
+ public static final int EXIT_SPRINGLOADED_MODE_SHORT_TIMEOUT = 300;
+ private static final int ON_ACTIVITY_RESULT_ANIMATION_DELAY = 500;
private static final int SHOW_CLING_DURATION = 250;
private static final int DISMISS_CLING_DURATION = 200;
@@ -227,6 +229,7 @@
private ItemInfo mPendingAddInfo = new ItemInfo();
private AppWidgetProviderInfo mPendingAddWidgetInfo;
+ private int mPendingAddWidgetId = -1;
private int[] mTmpAddItemCellCoordinates = new int[2];
@@ -305,6 +308,7 @@
private Drawable mWorkspaceBackgroundDrawable;
private final ArrayList<Integer> mSynchronouslyBoundPages = new ArrayList<Integer>();
+ private static final boolean DISABLE_SYNCHRONOUS_BINDING_CURRENT_PAGE = false;
static final ArrayList<String> sDumpLogs = new ArrayList<String>();
static Date sDateStamp = new Date();
@@ -390,6 +394,7 @@
display.getRealSize(realSize);
DisplayMetrics dm = new DisplayMetrics();
display.getMetrics(dm);
+
// Lazy-initialize the dynamic grid
DeviceProfile grid = app.initDynamicGrid(this,
Math.min(smallestSize.x, smallestSize.y),
@@ -437,18 +442,12 @@
mSavedState = savedInstanceState;
restoreState(mSavedState);
- // Update customization drawer _after_ restoring the states
- if (mAppsCustomizeContent != null) {
- mAppsCustomizeContent.onPackagesUpdated(
- LauncherModel.getSortedWidgetsAndShortcuts(this));
- }
-
if (PROFILE_STARTUP) {
android.os.Debug.stopMethodTracing();
}
if (!mRestoring) {
- if (sPausedFromUserAction) {
+ if (DISABLE_SYNCHRONOUS_BINDING_CURRENT_PAGE || sPausedFromUserAction) {
// If the user leaves launcher, then we should just load items asynchronously when
// they return.
mModel.startLoader(true, -1);
@@ -708,14 +707,27 @@
final int requestCode, final int resultCode, final Intent data) {
// Reset the startActivity waiting flag
mWaitingForResult = false;
+ int pendingAddWidgetId = mPendingAddWidgetId;
+ mPendingAddWidgetId = -1;
+
+ Runnable exitSpringLoaded = new Runnable() {
+ @Override
+ public void run() {
+ exitSpringLoadedDragModeDelayed((resultCode != RESULT_CANCELED),
+ EXIT_SPRINGLOADED_MODE_SHORT_TIMEOUT, null);
+ }
+ };
if (requestCode == REQUEST_BIND_APPWIDGET) {
- int appWidgetId = data != null ?
+ final int appWidgetId = data != null ?
data.getIntExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, -1) : -1;
if (resultCode == RESULT_CANCELED) {
completeTwoStageWidgetDrop(RESULT_CANCELED, appWidgetId);
+ mWorkspace.removeExtraEmptyScreen(true, exitSpringLoaded,
+ ON_ACTIVITY_RESULT_ANIMATION_DELAY, false);
} else if (resultCode == RESULT_OK) {
- addAppWidgetImpl(appWidgetId, mPendingAddInfo, null, mPendingAddWidgetInfo);
+ addAppWidgetImpl(appWidgetId, mPendingAddInfo, null,
+ mPendingAddWidgetInfo, ON_ACTIVITY_RESULT_ANIMATION_DELAY);
}
return;
} else if (requestCode == REQUEST_PICK_WALLPAPER) {
@@ -725,22 +737,48 @@
return;
}
- boolean delayExitSpringLoadedMode = false;
boolean isWidgetDrop = (requestCode == REQUEST_PICK_APPWIDGET ||
requestCode == REQUEST_CREATE_APPWIDGET);
// We have special handling for widgets
if (isWidgetDrop) {
- int appWidgetId = data != null ?
- data.getIntExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, -1) : -1;
- if (appWidgetId < 0) {
+ final int appWidgetId;
+ int widgetId = data != null ? data.getIntExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, -1)
+ : -1;
+ if (widgetId < 0) {
+ appWidgetId = pendingAddWidgetId;
+ } else {
+ appWidgetId = widgetId;
+ }
+
+ final int result;
+ final Runnable onComplete;
+ if (appWidgetId < 0 || resultCode == RESULT_CANCELED) {
Log.e(TAG, "Error: appWidgetId (EXTRA_APPWIDGET_ID) was not returned from the \\" +
"widget configuration activity.");
- completeTwoStageWidgetDrop(RESULT_CANCELED, appWidgetId);
- mWorkspace.stripEmptyScreens();
+ result = RESULT_CANCELED;
+ completeTwoStageWidgetDrop(result, appWidgetId);
+ onComplete = new Runnable() {
+ @Override
+ public void run() {
+ exitSpringLoadedDragModeDelayed(false, 0, null);
+ }
+ };
} else {
- completeTwoStageWidgetDrop(resultCode, appWidgetId);
+ result = resultCode;
+ final CellLayout dropLayout =
+ (CellLayout) mWorkspace.getScreenWithId(mPendingAddInfo.screenId);
+ dropLayout.setDropPending(true);
+ onComplete = new Runnable() {
+ @Override
+ public void run() {
+ completeTwoStageWidgetDrop(result, appWidgetId);
+ dropLayout.setDropPending(false);
+ }
+ };
}
+ mWorkspace.removeExtraEmptyScreen(true, onComplete, ON_ACTIVITY_RESULT_ANIMATION_DELAY,
+ false);
return;
}
@@ -760,15 +798,15 @@
if (isWorkspaceLocked()) {
sPendingAddList.add(args);
} else {
- delayExitSpringLoadedMode = completeAdd(args);
+ completeAdd(args);
}
+ mWorkspace.removeExtraEmptyScreen(true, exitSpringLoaded,
+ ON_ACTIVITY_RESULT_ANIMATION_DELAY, false);
} else if (resultCode == RESULT_CANCELED) {
- mWorkspace.stripEmptyScreens();
+ mWorkspace.removeExtraEmptyScreen(true, exitSpringLoaded,
+ ON_ACTIVITY_RESULT_ANIMATION_DELAY, false);
}
mDragLayer.clearAnimatedView();
- // Exit spring loaded mode if necessary after cancelling the configuration of a widget
- exitSpringLoadedDragModeDelayed((resultCode != RESULT_CANCELED), delayExitSpringLoadedMode,
- null);
}
private void completeTwoStageWidgetDrop(final int resultCode, final int appWidgetId) {
@@ -788,25 +826,19 @@
public void run() {
completeAddAppWidget(appWidgetId, mPendingAddInfo.container,
mPendingAddInfo.screenId, layout, null);
- exitSpringLoadedDragModeDelayed((resultCode != RESULT_CANCELED), false,
- null);
+ exitSpringLoadedDragModeDelayed((resultCode != RESULT_CANCELED),
+ EXIT_SPRINGLOADED_MODE_SHORT_TIMEOUT, null);
}
};
} else if (resultCode == RESULT_CANCELED) {
+ mAppWidgetHost.deleteAppWidgetId(appWidgetId);
animationType = Workspace.CANCEL_TWO_STAGE_WIDGET_DROP_ANIMATION;
- onCompleteRunnable = new Runnable() {
- @Override
- public void run() {
- exitSpringLoadedDragModeDelayed((resultCode != RESULT_CANCELED), false,
- null);
- }
- };
}
if (mDragLayer.getAnimatedView() != null) {
mWorkspace.animateWidgetDrop(mPendingAddInfo, cellLayout,
(DragView) mDragLayer.getAnimatedView(), onCompleteRunnable,
animationType, boundWidget, true);
- } else {
+ } else if (onCompleteRunnable != null) {
// The animated view may be null in the case of a rotation during widget configuration
onCompleteRunnable.run();
}
@@ -1103,6 +1135,7 @@
mPendingAddInfo.spanX = savedState.getInt(RUNTIME_STATE_PENDING_ADD_SPAN_X);
mPendingAddInfo.spanY = savedState.getInt(RUNTIME_STATE_PENDING_ADD_SPAN_Y);
mPendingAddWidgetInfo = savedState.getParcelable(RUNTIME_STATE_PENDING_ADD_WIDGET_INFO);
+ mPendingAddWidgetId = savedState.getInt(RUNTIME_STATE_PENDING_ADD_WIDGET_ID);
mWaitingForResult = true;
mRestoring = true;
}
@@ -1727,6 +1760,7 @@
outState.putInt(RUNTIME_STATE_PENDING_ADD_SPAN_X, mPendingAddInfo.spanX);
outState.putInt(RUNTIME_STATE_PENDING_ADD_SPAN_Y, mPendingAddInfo.spanY);
outState.putParcelable(RUNTIME_STATE_PENDING_ADD_WIDGET_INFO, mPendingAddWidgetInfo);
+ outState.putInt(RUNTIME_STATE_PENDING_ADD_WIDGET_ID, mPendingAddWidgetId);
}
if (mFolderInfo != null && mWaitingForResult) {
@@ -1900,10 +1934,17 @@
mPendingAddInfo.dropPos = null;
}
- void addAppWidgetImpl(final int appWidgetId, ItemInfo info, AppWidgetHostView boundWidget,
- AppWidgetProviderInfo appWidgetInfo) {
+ void addAppWidgetImpl(final int appWidgetId, final ItemInfo info,
+ final AppWidgetHostView boundWidget, final AppWidgetProviderInfo appWidgetInfo) {
+ addAppWidgetImpl(appWidgetId, info, boundWidget, appWidgetInfo, 0);
+ }
+
+ void addAppWidgetImpl(final int appWidgetId, final ItemInfo info,
+ final AppWidgetHostView boundWidget, final AppWidgetProviderInfo appWidgetInfo, int
+ delay) {
if (appWidgetInfo.configure != null) {
mPendingAddWidgetInfo = appWidgetInfo;
+ mPendingAddWidgetId = appWidgetId;
// Launch over to configure widget, if needed
Intent intent = new Intent(AppWidgetManager.ACTION_APPWIDGET_CONFIGURE);
@@ -1912,10 +1953,17 @@
Utilities.startActivityForResultSafely(this, intent, REQUEST_CREATE_APPWIDGET);
} else {
// Otherwise just add it
+ Runnable onComplete = new Runnable() {
+ @Override
+ public void run() {
+ // Exit spring loaded mode if necessary after adding the widget
+ exitSpringLoadedDragModeDelayed(true, EXIT_SPRINGLOADED_MODE_SHORT_TIMEOUT,
+ null);
+ }
+ };
completeAddAppWidget(appWidgetId, info.container, info.screenId, boundWidget,
appWidgetInfo);
- // Exit spring loaded mode if necessary after adding the widget
- exitSpringLoadedDragModeDelayed(true, false, null);
+ mWorkspace.removeExtraEmptyScreen(true, onComplete, delay, false);
}
}
@@ -2979,7 +3027,7 @@
dispatchOnLauncherTransitionPrepare(fromView, animated, true);
dispatchOnLauncherTransitionPrepare(toView, animated, true);
- mAppsCustomizeContent.pauseScrolling();
+ mAppsCustomizeContent.stopScrolling();
mStateAnimation.addListener(new AnimatorListenerAdapter() {
@Override
@@ -2991,7 +3039,6 @@
onCompleteRunnable.run();
}
mAppsCustomizeContent.updateCurrentPageScroll();
- mAppsCustomizeContent.resumeScrolling();
}
});
@@ -3104,7 +3151,7 @@
}
}
- void exitSpringLoadedDragModeDelayed(final boolean successfulDrop, boolean extendedDelay,
+ void exitSpringLoadedDragModeDelayed(final boolean successfulDrop, int delay,
final Runnable onCompleteRunnable) {
if (mState != State.APPS_CUSTOMIZE_SPRING_LOADED) return;
@@ -3121,9 +3168,8 @@
exitSpringLoadedDragMode();
}
}
- }, (extendedDelay ?
- EXIT_SPRINGLOADED_MODE_LONG_TIMEOUT :
- EXIT_SPRINGLOADED_MODE_SHORT_TIMEOUT));
+ }, delay);
+
}
void exitSpringLoadedDragMode() {
@@ -3662,7 +3708,7 @@
}
// Remove the extra empty screen
- mWorkspace.removeExtraEmptyScreen();
+ mWorkspace.removeExtraEmptyScreen(false, null);
if (!AppsCustomizePagedView.DISABLE_ALL_APPS &&
addedApps != null && mAppsCustomizeContent != null) {
@@ -3932,6 +3978,8 @@
} else {
if (mAppsCustomizeContent != null) {
mAppsCustomizeContent.setApps(apps);
+ mAppsCustomizeContent.onPackagesUpdated(
+ LauncherModel.getSortedWidgetsAndShortcuts(this));
}
}
}
@@ -3971,26 +4019,27 @@
* Implementation of the method from LauncherModel.Callbacks.
*/
public void bindComponentsRemoved(final ArrayList<String> packageNames,
- final ArrayList<AppInfo> appInfos,
- final boolean packageRemoved) {
+ final ArrayList<AppInfo> appInfos) {
Runnable r = new Runnable() {
public void run() {
- bindComponentsRemoved(packageNames, appInfos, packageRemoved);
+ bindComponentsRemoved(packageNames, appInfos);
}
};
if (waitUntilResume(r)) {
return;
}
- if (packageRemoved) {
+ if (!packageNames.isEmpty()) {
mWorkspace.removeItemsByPackageName(packageNames);
- } else {
+ }
+ if (!appInfos.isEmpty()) {
mWorkspace.removeItemsByApplicationInfo(appInfos);
}
// Notify the drag controller
- mDragController.onAppsRemoved(appInfos, this);
+ mDragController.onAppsRemoved(packageNames, appInfos);
+ // Update AllApps
if (!AppsCustomizePagedView.DISABLE_ALL_APPS &&
mAppsCustomizeContent != null) {
mAppsCustomizeContent.removeApps(appInfos);
@@ -4007,7 +4056,6 @@
mWidgetsAndShortcuts = null;
}
};
-
public void bindPackagesUpdated(final ArrayList<Object> widgetsAndShortcuts) {
if (waitUntilResume(mBindPackagesUpdatedRunnable, true)) {
mWidgetsAndShortcuts = widgetsAndShortcuts;
@@ -4090,6 +4138,9 @@
if (grid.isTablet()) {
return false;
}
+ if (grid.isLandscape) {
+ return false;
+ }
// disable clings when running in a test harness
if(ActivityManager.isRunningInTestHarness()) return false;
diff --git a/src/com/android/launcher3/LauncherAnimUtils.java b/src/com/android/launcher3/LauncherAnimUtils.java
index 5d4f9c6..e6c220b 100644
--- a/src/com/android/launcher3/LauncherAnimUtils.java
+++ b/src/com/android/launcher3/LauncherAnimUtils.java
@@ -25,12 +25,13 @@
import android.view.ViewTreeObserver;
import java.util.HashSet;
+import java.util.WeakHashMap;
public class LauncherAnimUtils {
- static HashSet<Animator> sAnimators = new HashSet<Animator>();
+ static WeakHashMap<Animator, Object> sAnimators = new WeakHashMap<Animator, Object>();
static Animator.AnimatorListener sEndAnimListener = new Animator.AnimatorListener() {
public void onAnimationStart(Animator animation) {
- sAnimators.add(animation);
+ sAnimators.put(animation, null);
}
public void onAnimationRepeat(Animator animation) {
@@ -74,13 +75,12 @@
}
public static void onDestroyActivity() {
- HashSet<Animator> animators = new HashSet<Animator>(sAnimators);
+ HashSet<Animator> animators = new HashSet<Animator>(sAnimators.keySet());
for (Animator a : animators) {
if (a.isRunning()) {
a.cancel();
- } else {
- sAnimators.remove(a);
}
+ sAnimators.remove(a);
}
}
diff --git a/src/com/android/launcher3/LauncherAppState.java b/src/com/android/launcher3/LauncherAppState.java
index a255b89..fe2b43f 100644
--- a/src/com/android/launcher3/LauncherAppState.java
+++ b/src/com/android/launcher3/LauncherAppState.java
@@ -28,7 +28,7 @@
import java.lang.ref.WeakReference;
-public class LauncherAppState {
+public class LauncherAppState implements DeviceProfile.DeviceProfileCallbacks {
private static final String TAG = "LauncherAppState";
private static final String SHARED_PREFERENCES_KEY = "com.android.launcher3.prefs";
@@ -182,12 +182,12 @@
context.getResources(),
minWidth, minHeight, width, height,
availableWidth, availableHeight);
+ mDynamicGrid.getDeviceProfile().addCallback(this);
}
// Update the icon size
DeviceProfile grid = mDynamicGrid.getDeviceProfile();
- Utilities.setIconSize(grid.iconSizePx);
- grid.updateFromConfiguration(context.getResources(), width, height,
+ grid.updateFromConfiguration(context, context.getResources(), width, height,
availableWidth, availableHeight);
return grid;
}
@@ -216,4 +216,9 @@
public int getLongPressTimeout() {
return mLongPressTimeout;
}
+
+ @Override
+ public void onAvailableSizeChanged(DeviceProfile grid) {
+ Utilities.setIconSize(grid.iconSizePx);
+ }
}
diff --git a/src/com/android/launcher3/LauncherAppWidgetHostView.java b/src/com/android/launcher3/LauncherAppWidgetHostView.java
index 83aef1a..51a649a 100644
--- a/src/com/android/launcher3/LauncherAppWidgetHostView.java
+++ b/src/com/android/launcher3/LauncherAppWidgetHostView.java
@@ -65,6 +65,12 @@
}
public boolean onInterceptTouchEvent(MotionEvent ev) {
+ // Just in case the previous long press hasn't been cleared, we make sure to start fresh
+ // on touch down.
+ if (ev.getAction() == MotionEvent.ACTION_DOWN) {
+ mLongPressHelper.cancelLongPress();
+ }
+
// Consume any touch events for ourselves after longpress is triggered
if (mLongPressHelper.hasPerformedLongPress()) {
mLongPressHelper.cancelLongPress();
@@ -110,13 +116,15 @@
@Override
public void onTouchComplete() {
- mLongPressHelper.cancelLongPress();
+ if (!mLongPressHelper.hasPerformedLongPress()) {
+ // If a long press has been performed, we don't want to clear the record of that since
+ // we still may be receiving a touch up which we want to intercept
+ mLongPressHelper.cancelLongPress();
+ }
}
@Override
public int getDescendantFocusability() {
return ViewGroup.FOCUS_BLOCK_DESCENDANTS;
}
-
-
}
diff --git a/src/com/android/launcher3/LauncherBackupHelper.java b/src/com/android/launcher3/LauncherBackupHelper.java
index 9b901ee..8023fcd 100644
--- a/src/com/android/launcher3/LauncherBackupHelper.java
+++ b/src/com/android/launcher3/LauncherBackupHelper.java
@@ -31,9 +31,8 @@
import com.android.launcher3.backup.BackupProtos.Widget;
import android.app.backup.BackupDataInputStream;
-import android.app.backup.BackupHelper;
-import android.app.backup.BackupDataInput;
import android.app.backup.BackupDataOutput;
+import android.app.backup.BackupHelper;
import android.app.backup.BackupManager;
import android.appwidget.AppWidgetManager;
import android.appwidget.AppWidgetProviderInfo;
diff --git a/src/com/android/launcher3/LauncherModel.java b/src/com/android/launcher3/LauncherModel.java
index 7e1442d..c746b4d 100644
--- a/src/com/android/launcher3/LauncherModel.java
+++ b/src/com/android/launcher3/LauncherModel.java
@@ -165,8 +165,7 @@
ArrayList<AppInfo> addedApps);
public void bindAppsUpdated(ArrayList<AppInfo> apps);
public void bindComponentsRemoved(ArrayList<String> packageNames,
- ArrayList<AppInfo> appInfos,
- boolean matchPackageNamesOnly);
+ ArrayList<AppInfo> appInfos);
public void bindPackagesUpdated(ArrayList<Object> widgetsAndShortcuts);
public void bindSearchablesChanged();
public boolean isAllAppsButtonRank(int rank);
@@ -186,9 +185,6 @@
mBgAllAppsList = new AllAppsList(iconCache, appFilter);
mIconCache = iconCache;
- mDefaultIcon = Utilities.createIconBitmap(
- mIconCache.getFullResDefaultActivityIcon(), context);
-
final Resources res = context.getResources();
Configuration config = res.getConfiguration();
mPreviousConfigMcc = config.mcc;
@@ -400,6 +396,11 @@
}
public Bitmap getFallbackIcon() {
+ if (mDefaultIcon == null) {
+ final Context context = LauncherAppState.getInstance().getContext();
+ mDefaultIcon = Utilities.createIconBitmap(
+ mIconCache.getFullResDefaultActivityIcon(), context);
+ }
return Bitmap.createBitmap(mDefaultIcon);
}
@@ -2551,43 +2552,47 @@
}
});
}
- // If a package has been removed, or an app has been removed as a result of
- // an update (for example), make the removed callback.
- if (mOp == OP_REMOVE || !removedApps.isEmpty()) {
- final boolean packageRemoved = (mOp == OP_REMOVE);
- final ArrayList<String> removedPackageNames =
- new ArrayList<String>(Arrays.asList(packages));
- // Update the launcher db to reflect the removal of apps
- if (packageRemoved) {
- for (String pn : removedPackageNames) {
- ArrayList<ItemInfo> infos = getItemInfoForPackageName(pn);
- for (ItemInfo i : infos) {
- deleteItemFromDatabase(context, i);
- }
- }
-
- // Remove any queued items from the install queue
- String spKey = LauncherAppState.getSharedPreferencesKey();
- SharedPreferences sp =
- context.getSharedPreferences(spKey, Context.MODE_PRIVATE);
- InstallShortcutReceiver.removeFromInstallQueue(sp, removedPackageNames);
- } else {
- for (AppInfo a : removedApps) {
- ArrayList<ItemInfo> infos =
- getItemInfoForComponentName(a.componentName);
- for (ItemInfo i : infos) {
- deleteItemFromDatabase(context, i);
- }
+ final ArrayList<String> removedPackageNames =
+ new ArrayList<String>();
+ if (mOp == OP_REMOVE) {
+ // Mark all packages in the broadcast to be removed
+ removedPackageNames.addAll(Arrays.asList(packages));
+ } else if (mOp == OP_UPDATE) {
+ // Mark disabled packages in the broadcast to be removed
+ final PackageManager pm = context.getPackageManager();
+ for (int i=0; i<N; i++) {
+ if (isPackageDisabled(pm, packages[i])) {
+ removedPackageNames.add(packages[i]);
}
}
-
+ }
+ // Remove all the components associated with this package
+ for (String pn : removedPackageNames) {
+ ArrayList<ItemInfo> infos = getItemInfoForPackageName(pn);
+ for (ItemInfo i : infos) {
+ deleteItemFromDatabase(context, i);
+ }
+ }
+ // Remove all the specific components
+ for (AppInfo a : removedApps) {
+ ArrayList<ItemInfo> infos = getItemInfoForComponentName(a.componentName);
+ for (ItemInfo i : infos) {
+ deleteItemFromDatabase(context, i);
+ }
+ }
+ if (!removedPackageNames.isEmpty() || !removedApps.isEmpty()) {
+ // Remove any queued items from the install queue
+ String spKey = LauncherAppState.getSharedPreferencesKey();
+ SharedPreferences sp =
+ context.getSharedPreferences(spKey, Context.MODE_PRIVATE);
+ InstallShortcutReceiver.removeFromInstallQueue(sp, removedPackageNames);
+ // Call the components-removed callback
mHandler.post(new Runnable() {
public void run() {
Callbacks cb = mCallbacks != null ? mCallbacks.get() : null;
if (callbacks == cb && cb != null) {
- callbacks.bindComponentsRemoved(removedPackageNames,
- removedApps, packageRemoved);
+ callbacks.bindComponentsRemoved(removedPackageNames, removedApps);
}
}
});
@@ -2629,19 +2634,26 @@
return widgetsAndShortcuts;
}
+ private boolean isPackageDisabled(PackageManager pm, String packageName) {
+ try {
+ PackageInfo pi = pm.getPackageInfo(packageName, 0);
+ return !pi.applicationInfo.enabled;
+ } catch (NameNotFoundException e) {
+ // Fall through
+ }
+ return false;
+ }
private boolean isValidPackageComponent(PackageManager pm, ComponentName cn) {
if (cn == null) {
return false;
}
+ if (isPackageDisabled(pm, cn.getPackageName())) {
+ return false;
+ }
try {
- // Skip if the application is disabled
- PackageInfo pi = pm.getPackageInfo(cn.getPackageName(), 0);
- if (!pi.applicationInfo.enabled) {
- return false;
- }
-
// Check the activity
+ PackageInfo pi = pm.getPackageInfo(cn.getPackageName(), 0);
return (pm.getActivityInfo(cn, 0) != null);
} catch (NameNotFoundException e) {
return false;
diff --git a/src/com/android/launcher3/PagedView.java b/src/com/android/launcher3/PagedView.java
index e982985..8181bea 100644
--- a/src/com/android/launcher3/PagedView.java
+++ b/src/com/android/launcher3/PagedView.java
@@ -124,6 +124,7 @@
protected int mMaxScrollX;
protected Scroller mScroller;
private VelocityTracker mVelocityTracker;
+ private int mPageSpacing = 0;
private float mParentDownMotionX;
private float mParentDownMotionY;
@@ -151,13 +152,14 @@
protected int mTouchState = TOUCH_STATE_REST;
protected boolean mForceScreenScrolled = false;
+ private boolean mScrollAbortedFromIntercept = false;
+
protected OnLongClickListener mLongClickListener;
protected int mTouchSlop;
private int mPagingTouchSlop;
private int mMaximumVelocity;
- protected int mPageSpacing;
protected int mPageLayoutPaddingTop;
protected int mPageLayoutPaddingBottom;
protected int mPageLayoutPaddingLeft;
@@ -260,16 +262,11 @@
// Drop to delete
private View mDeleteDropTarget;
- private boolean mAutoComputePageSpacing = false;
- private boolean mRecomputePageSpacing = false;
-
// Bouncer
private boolean mTopAlignPageWhenShrinkingForBouncer = false;
protected final Rect mInsets = new Rect();
- protected int mFirstChildLeft;
-
public interface PageSwitchListener {
void onPageSwitch(View newPage, int newPageIndex);
}
@@ -287,10 +284,7 @@
TypedArray a = context.obtainStyledAttributes(attrs,
R.styleable.PagedView, defStyle, 0);
- setPageSpacing(a.getDimensionPixelSize(R.styleable.PagedView_pageSpacing, 0));
- if (mPageSpacing < 0) {
- mAutoComputePageSpacing = mRecomputePageSpacing = true;
- }
+
mPageLayoutPaddingTop = a.getDimensionPixelSize(
R.styleable.PagedView_pageLayoutPaddingTop, 0);
mPageLayoutPaddingBottom = a.getDimensionPixelSize(
@@ -515,33 +509,41 @@
}
scrollTo(newX, 0);
mScroller.setFinalX(newX);
- mScroller.forceFinished(true);
+ forceFinishScroller();
}
/**
* Called during AllApps/Home transitions to avoid unnecessary work. When that other animation
- * ends, {@link #resumeScrolling()} should be called, along with
- * {@link #updateCurrentPageScroll()} to correctly set the final state and re-enable scrolling.
+ * {@link #updateCurrentPageScroll()} should be called, to correctly set the final state and
+ * re-enable scrolling.
*/
- void pauseScrolling() {
- mScroller.forceFinished(true);
+ void stopScrolling() {
+ mCurrentPage = getNextPage();
+ forceFinishScroller();
}
- /**
- * Enables scrolling again.
- * @see #pauseScrolling()
- */
- void resumeScrolling() {
+ private void abortScrollerAnimation(boolean resetNextPage) {
+ mScroller.abortAnimation();
+ // We need to clean up the next page here to avoid computeScrollHelper from
+ // updating current page on the pass.
+ if (resetNextPage) {
+ mNextPage = INVALID_PAGE;
+ }
}
+
+ private void forceFinishScroller() {
+ mScroller.forceFinished(true);
+ // We need to clean up the next page here to avoid computeScrollHelper from
+ // updating current page on the pass.
+ mNextPage = INVALID_PAGE;
+ }
+
/**
* Sets the current page.
*/
void setCurrentPage(int currentPage) {
if (!mScroller.isFinished()) {
- mScroller.abortAnimation();
- // We need to clean up the next page here to avoid computeScrollHelper from
- // updating current page on the pass.
- mNextPage = INVALID_PAGE;
+ abortScrollerAnimation(true);
}
// don't introduce any checks like mCurrentPage == currentPage here-- if we change the
// the default
@@ -675,6 +677,7 @@
AccessibilityEvent.obtain(AccessibilityEvent.TYPE_VIEW_SCROLLED);
ev.setItemCount(getChildCount());
ev.setFromIndex(mCurrentPage);
+ ev.setToIndex(getNextPage());
final int action;
if (getNextPage() >= mCurrentPage) {
@@ -786,13 +789,13 @@
// NOTE: We multiply by 1.5f to account for the fact that depending on the offset of the
// viewport, we can be at most one and a half screens offset once we scale down
DisplayMetrics dm = getResources().getDisplayMetrics();
- int maxSize = Math.max(dm.widthPixels, dm.heightPixels + mInsets.top + mInsets.bottom);
+ int maxSize = Math.max(dm.widthPixels + mInsets.left + mInsets.right,
+ dm.heightPixels + mInsets.top + mInsets.bottom);
- int parentWidthSize, parentHeightSize;
+ int parentWidthSize = (int) (1.5f * maxSize);
+ int parentHeightSize = maxSize;
int scaledWidthSize, scaledHeightSize;
if (mUseMinScale) {
- parentWidthSize = (int) (1.5f * maxSize);
- parentHeightSize = maxSize;
scaledWidthSize = (int) (parentWidthSize / mMinScale);
scaledHeightSize = (int) (parentHeightSize / mMinScale);
} else {
@@ -852,21 +855,17 @@
childHeightMode = MeasureSpec.EXACTLY;
}
- childWidth = widthSize - horizontalPadding;
- childHeight = heightSize - verticalPadding - mInsets.top - mInsets.bottom;
+ childWidth = getViewportWidth() - horizontalPadding
+ - mInsets.left - mInsets.right;
+ childHeight = getViewportHeight() - verticalPadding
+ - mInsets.top - mInsets.bottom;
mNormalChildHeight = childHeight;
-
} else {
childWidthMode = MeasureSpec.EXACTLY;
childHeightMode = MeasureSpec.EXACTLY;
- if (mUseMinScale) {
- childWidth = getViewportWidth();
- childHeight = getViewportHeight();
- } else {
- childWidth = widthSize - getPaddingLeft() - getPaddingRight();
- childHeight = heightSize - getPaddingTop() - getPaddingBottom();
- }
+ childWidth = getViewportWidth() - mInsets.left - mInsets.right;
+ childHeight = getViewportHeight();
}
final int childWidthMeasureSpec =
@@ -877,30 +876,6 @@
}
}
setMeasuredDimension(scaledWidthSize, scaledHeightSize);
-
- if (childCount > 0) {
- // Calculate the variable page spacing if necessary
- if (mAutoComputePageSpacing && mRecomputePageSpacing) {
- // The gap between pages in the PagedView should be equal to the gap from the page
- // to the edge of the screen (so it is not visible in the current screen). To
- // account for unequal padding on each side of the paged view, we take the maximum
- // of the left/right gap and use that as the gap between each page.
- int offset = (getViewportWidth() - getChildWidth(0)) / 2;
- int spacing = Math.max(offset, widthSize - offset -
- getChildAt(0).getMeasuredWidth());
- setPageSpacing(spacing);
- mRecomputePageSpacing = false;
- }
- }
- }
-
- public void setPageSpacing(int pageSpacing) {
- mPageSpacing = pageSpacing;
- requestLayout();
- }
-
- protected int getFirstChildLeft() {
- return mFirstChildLeft;
}
@Override
@@ -912,8 +887,6 @@
if (DEBUG) Log.d(TAG, "PagedView.onLayout()");
final int childCount = getChildCount();
- int screenWidth = getViewportWidth();
-
int offsetX = getViewportOffsetX();
int offsetY = getViewportOffsetY();
@@ -928,7 +901,9 @@
int verticalPadding = getPaddingTop() + getPaddingBottom();
- int childLeft = mFirstChildLeft = offsetX + (screenWidth - getChildWidth(startIndex)) / 2;
+ LayoutParams lp = (LayoutParams) getChildAt(startIndex).getLayoutParams();
+
+ int childLeft = offsetX + (lp.isFullScreenPage ? 0 : getPaddingLeft());
if (mPageScrolls == null || getChildCount() != mChildCountOnLastLayout) {
mPageScrolls = new int[getChildCount()];
}
@@ -936,7 +911,7 @@
for (int i = startIndex; i != endIndex; i += delta) {
final View child = getPageAt(i);
if (child.getVisibility() != View.GONE) {
- LayoutParams lp = (LayoutParams) child.getLayoutParams();
+ lp = (LayoutParams) child.getLayoutParams();
int childTop;
if (lp.isFullScreenPage) {
childTop = offsetY;
@@ -954,16 +929,9 @@
child.layout(childLeft, childTop,
childLeft + child.getMeasuredWidth(), childTop + childHeight);
- // We assume the left and right padding are equal, and hence center the pages
- // horizontally
- int scrollOffset = (getViewportWidth() - childWidth) / 2;
- mPageScrolls[i] = childLeft - scrollOffset - offsetX;
-
- if (i != endIndex - delta) {
- childLeft += childWidth + scrollOffset;
- int nextScrollOffset = (getViewportWidth() - getChildWidth(i + delta)) / 2;
- childLeft += nextScrollOffset;
- }
+ int scrollOffsetLeft = lp.isFullScreenPage ? 0 : getPaddingLeft();
+ mPageScrolls[i] = childLeft - scrollOffsetLeft - offsetX;
+ childLeft += childWidth + mPageSpacing;
}
}
@@ -997,6 +965,11 @@
}
}
+ public void setPageSpacing(int pageSpacing) {
+ mPageSpacing = pageSpacing;
+ requestLayout();
+ }
+
protected void screenScrolled(int screenCenter) {
boolean isInOverscroll = mOverScrollX < 0 || mOverScrollX > mMaxScrollX;
@@ -1035,7 +1008,6 @@
// This ensures that when children are added, they get the correct transforms / alphas
// in accordance with any scroll effects.
mForceScreenScrolled = true;
- mRecomputePageSpacing = true;
updateFreescrollBounds();
invalidate();
}
@@ -1304,24 +1276,22 @@
* Return true if a tap at (x, y) should trigger a flip to the previous page.
*/
protected boolean hitsPreviousPage(float x, float y) {
- int offset = (getViewportWidth() - getChildWidth(mCurrentPage)) / 2;
if (isLayoutRtl()) {
return (x > (getViewportOffsetX() + getViewportWidth() -
- offset + mPageSpacing));
+ getPaddingRight() - mPageSpacing));
}
- return (x < getViewportOffsetX() + offset - mPageSpacing);
+ return (x < getViewportOffsetX() + getPaddingLeft() + mPageSpacing);
}
/**
* Return true if a tap at (x, y) should trigger a flip to the next page.
*/
protected boolean hitsNextPage(float x, float y) {
- int offset = (getViewportWidth() - getChildWidth(mCurrentPage)) / 2;
if (isLayoutRtl()) {
- return (x < getViewportOffsetX() + offset - mPageSpacing);
+ return (x < getViewportOffsetX() + getPaddingLeft() + mPageSpacing);
}
return (x > (getViewportOffsetX() + getViewportWidth() -
- offset + mPageSpacing));
+ getPaddingRight() - mPageSpacing));
}
/** Returns whether x and y originated within the buffered viewport */
@@ -1400,7 +1370,8 @@
final boolean finishedScrolling = (mScroller.isFinished() || xDist < mTouchSlop);
if (finishedScrolling) {
mTouchState = TOUCH_STATE_REST;
- mScroller.abortAnimation();
+ mScrollAbortedFromIntercept = true;
+ abortScrollerAnimation(false);
} else {
if (isTouchPointInViewportWithBuffer((int) mDownMotionX, (int) mDownMotionY)) {
mTouchState = TOUCH_STATE_SCROLLING;
@@ -1427,6 +1398,9 @@
case MotionEvent.ACTION_UP:
case MotionEvent.ACTION_CANCEL:
+ if (mScrollAbortedFromIntercept) {
+ snapToDestination();
+ }
resetTouchState();
break;
@@ -1512,8 +1486,21 @@
protected float getScrollProgress(int screenCenter, View v, int page) {
final int halfScreenSize = getViewportWidth() / 2;
- int totalDistance = v.getMeasuredWidth() + mPageSpacing;
int delta = screenCenter - (getScrollForPage(page) + halfScreenSize);
+ int count = getChildCount();
+
+ final int totalDistance;
+
+ int adjacentPage = page + 1;
+ if ((delta < 0 && !isLayoutRtl()) || (delta > 0 && isLayoutRtl())) {
+ adjacentPage = page - 1;
+ }
+
+ if (adjacentPage < 0 || adjacentPage > count - 1) {
+ totalDistance = v.getMeasuredWidth() + mPageSpacing;
+ } else {
+ totalDistance = Math.abs(getScrollForPage(adjacentPage) - getScrollForPage(page));
+ }
float scrollProgress = delta / (totalDistance * 1.0f);
scrollProgress = Math.min(scrollProgress, getMaxScrollProgress());
@@ -1536,7 +1523,13 @@
return 0;
} else {
View child = getChildAt(index);
- int scrollOffset = (getViewportWidth() - child.getMeasuredWidth()) / 2;
+
+ int scrollOffset = 0;
+ LayoutParams lp = (LayoutParams) child.getLayoutParams();
+ if (!lp.isFullScreenPage) {
+ scrollOffset = isLayoutRtl() ? getPaddingRight() : getPaddingLeft();
+ }
+
int baselineX = mPageScrolls[index] + scrollOffset + getViewportOffsetX();
return (int) (child.getX() - baselineX);
}
@@ -1698,7 +1691,7 @@
* will be false if being flinged.
*/
if (!mScroller.isFinished()) {
- mScroller.abortAnimation();
+ abortScrollerAnimation(false);
}
// Remember where the motion event started
@@ -1884,19 +1877,10 @@
snapToPageWithVelocity(finalPage, velocityX);
} else {
snapToDestination();
- } } else if (mTouchState == TOUCH_STATE_PREV_PAGE) {
- // at this point we have not moved beyond the touch slop
- // (otherwise mTouchState would be TOUCH_STATE_SCROLLING), so
- // we can just page
- int nextPage = Math.max(0, mCurrentPage - 1);
- if (nextPage != mCurrentPage) {
- snapToPage(nextPage);
- } else {
- snapToDestination();
}
} else {
if (!mScroller.isFinished()) {
- mScroller.abortAnimation();
+ abortScrollerAnimation(true);
}
float scaleX = getScaleX();
@@ -1907,6 +1891,16 @@
getScrollY(), vX, 0, Integer.MIN_VALUE, Integer.MAX_VALUE, 0, 0);
invalidate();
}
+ } else if (mTouchState == TOUCH_STATE_PREV_PAGE) {
+ // at this point we have not moved beyond the touch slop
+ // (otherwise mTouchState would be TOUCH_STATE_SCROLLING), so
+ // we can just page
+ int nextPage = Math.max(0, mCurrentPage - 1);
+ if (nextPage != mCurrentPage) {
+ snapToPage(nextPage);
+ } else {
+ snapToDestination();
+ }
} else if (mTouchState == TOUCH_STATE_NEXT_PAGE) {
// at this point we have not moved beyond the touch slop
// (otherwise mTouchState would be TOUCH_STATE_SCROLLING), so
@@ -1978,6 +1972,7 @@
releaseVelocityTracker();
endReordering();
mCancelTap = false;
+ mScrollAbortedFromIntercept = false;
mTouchState = TOUCH_STATE_REST;
mActivePointerId = INVALID_POINTER;
}
@@ -2360,8 +2355,7 @@
if (mContentIsRefreshable) {
// Force all scrolling-related behavior to end
- mScroller.forceFinished(true);
- mNextPage = INVALID_PAGE;
+ forceFinishScroller();
// Update all the pages
syncPages();
diff --git a/src/com/android/launcher3/PagedViewIcon.java b/src/com/android/launcher3/PagedViewIcon.java
index 8bfe42d..f7cb997 100644
--- a/src/com/android/launcher3/PagedViewIcon.java
+++ b/src/com/android/launcher3/PagedViewIcon.java
@@ -20,7 +20,7 @@
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Region;
-import android.graphics.Region.Op;
+import android.graphics.drawable.Drawable;
import android.util.AttributeSet;
import android.util.TypedValue;
import android.widget.TextView;
@@ -62,15 +62,20 @@
// Ensure we are using the right text size
LauncherAppState app = LauncherAppState.getInstance();
DeviceProfile grid = app.getDynamicGrid().getDeviceProfile();
- setTextSize(TypedValue.COMPLEX_UNIT_SP, grid.iconTextSize);
+ setTextSize(TypedValue.COMPLEX_UNIT_PX, grid.allAppsIconTextSizePx);
}
public void applyFromApplicationInfo(AppInfo info, boolean scaleUp,
PagedViewIcon.PressedCallback cb) {
+ LauncherAppState app = LauncherAppState.getInstance();
+ DeviceProfile grid = app.getDynamicGrid().getDeviceProfile();
+
mIcon = info.iconBitmap;
mPressedCallback = cb;
- setCompoundDrawables(null, Utilities.createIconDrawable(mIcon),
- null, null);
+ Drawable icon = Utilities.createIconDrawable(mIcon);
+ icon.setBounds(0, 0, grid.allAppsIconSizePx, grid.allAppsIconSizePx);
+ setCompoundDrawables(null, icon, null, null);
+ setCompoundDrawablePadding(grid.iconDrawablePaddingPx);
setText(info.title);
setTag(info);
}
diff --git a/src/com/android/launcher3/PagedViewWidget.java b/src/com/android/launcher3/PagedViewWidget.java
index 45320a4..d2f897a 100644
--- a/src/com/android/launcher3/PagedViewWidget.java
+++ b/src/com/android/launcher3/PagedViewWidget.java
@@ -84,11 +84,11 @@
DeviceProfile grid = app.getDynamicGrid().getDeviceProfile();
TextView name = (TextView) findViewById(R.id.widget_name);
if (name != null) {
- name.setTextSize(TypedValue.COMPLEX_UNIT_SP, grid.iconTextSize);
+ name.setTextSize(TypedValue.COMPLEX_UNIT_PX, grid.iconTextSizePx);
}
TextView dims = (TextView) findViewById(R.id.widget_dims);
if (dims != null) {
- dims.setTextSize(TypedValue.COMPLEX_UNIT_SP, grid.iconTextSize);
+ dims.setTextSize(TypedValue.COMPLEX_UNIT_PX, grid.iconTextSizePx);
}
}
diff --git a/src/com/android/launcher3/SavedWallpaperImages.java b/src/com/android/launcher3/SavedWallpaperImages.java
index 8d5b005..58add70 100644
--- a/src/com/android/launcher3/SavedWallpaperImages.java
+++ b/src/com/android/launcher3/SavedWallpaperImages.java
@@ -60,12 +60,9 @@
public void onClick(WallpaperPickerActivity a) {
String imageFilename = a.getSavedImages().getImageFilename(mDbId);
File file = new File(a.getFilesDir(), imageFilename);
- CropView v = a.getCropView();
- int rotation = WallpaperCropActivity.getRotationFromExif(file.getAbsolutePath());
- v.setTileSource(
- new BitmapRegionTileSource(a, file.getAbsolutePath(), 1024, rotation), null);
- v.moveToLeft();
- v.setTouchEnabled(false);
+ BitmapRegionTileSource.FilePathBitmapSource bitmapSource =
+ new BitmapRegionTileSource.FilePathBitmapSource(file.getAbsolutePath(), 1024);
+ a.setCropViewTileSource(bitmapSource, false, true, null);
}
@Override
public void onSave(WallpaperPickerActivity a) {
diff --git a/src/com/android/launcher3/SearchDropTargetBar.java b/src/com/android/launcher3/SearchDropTargetBar.java
index 435dbda..18e7c86 100644
--- a/src/com/android/launcher3/SearchDropTargetBar.java
+++ b/src/com/android/launcher3/SearchDropTargetBar.java
@@ -71,10 +71,10 @@
mDeleteDropTarget.setLauncher(launcher);
mQSBSearchBar = launcher.getQsbBar();
if (mEnableDropDownDropTargets) {
- mQSBSearchBarAnim = LauncherAnimUtils.ofFloat(mQSBSearchBar, "translationY", 0,
+ mQSBSearchBarAnim = ObjectAnimator.ofFloat(mQSBSearchBar, "translationY", 0f,
-mBarHeight);
} else {
- mQSBSearchBarAnim = LauncherAnimUtils.ofFloat(mQSBSearchBar, "alpha", 1f, 0f);
+ mQSBSearchBarAnim = ObjectAnimator.ofFloat(mQSBSearchBar, "alpha", 1f, 0f);
}
setupAnimation(mQSBSearchBarAnim, mQSBSearchBar);
}
@@ -117,12 +117,12 @@
DeviceProfile grid = app.getDynamicGrid().getDeviceProfile();
mBarHeight = grid.searchBarSpaceHeightPx;
mDropTargetBar.setTranslationY(-mBarHeight);
- mDropTargetBarAnim = LauncherAnimUtils.ofFloat(mDropTargetBar, "translationY",
+ mDropTargetBarAnim = ObjectAnimator.ofFloat(mDropTargetBar, "translationY",
-mBarHeight, 0f);
} else {
mDropTargetBar.setAlpha(0f);
- mDropTargetBarAnim = LauncherAnimUtils.ofFloat(mDropTargetBar, "alpha", 0f, 1f);
+ mDropTargetBarAnim = ObjectAnimator.ofFloat(mDropTargetBar, "alpha", 0f, 1f);
}
setupAnimation(mDropTargetBarAnim, mDropTargetBar);
}
diff --git a/src/com/android/launcher3/SmoothPagedView.java b/src/com/android/launcher3/SmoothPagedView.java
index a45dbbf..64dcb34 100644
--- a/src/com/android/launcher3/SmoothPagedView.java
+++ b/src/com/android/launcher3/SmoothPagedView.java
@@ -52,8 +52,6 @@
}
public float getInterpolation(float t) {
- // _o(t) = t * t * ((tension + 1) * t + tension)
- // o(t) = _o(t - 1) + 1
t -= 1.0f;
return t * t * ((mTension + 1) * t + mTension) + 1.0f;
}
diff --git a/src/com/android/launcher3/WallpaperCropActivity.java b/src/com/android/launcher3/WallpaperCropActivity.java
index 30ec340..276aba3 100644
--- a/src/com/android/launcher3/WallpaperCropActivity.java
+++ b/src/com/android/launcher3/WallpaperCropActivity.java
@@ -37,15 +37,16 @@
import android.net.Uri;
import android.os.AsyncTask;
import android.os.Bundle;
-import android.util.FloatMath;
import android.util.Log;
import android.view.Display;
import android.view.View;
import android.view.WindowManager;
+import android.widget.Toast;
import com.android.gallery3d.common.Utils;
import com.android.gallery3d.exif.ExifInterface;
import com.android.photos.BitmapRegionTileSource;
+import com.android.photos.BitmapRegionTileSource.BitmapSource;
import java.io.BufferedInputStream;
import java.io.ByteArrayInputStream;
@@ -96,9 +97,6 @@
return;
}
- int rotation = getRotationFromExif(this, imageUri);
- mCropView.setTileSource(new BitmapRegionTileSource(this, imageUri, 1024, rotation), null);
- mCropView.setTouchEnabled(true);
// Action bar
// Show the custom action bar view
final ActionBar actionBar = getActionBar();
@@ -111,6 +109,63 @@
cropImageAndSetWallpaper(imageUri, null, finishActivityWhenDone);
}
});
+
+ // Load image in background
+ final BitmapRegionTileSource.UriBitmapSource bitmapSource =
+ new BitmapRegionTileSource.UriBitmapSource(this, imageUri, 1024);
+ Runnable onLoad = new Runnable() {
+ public void run() {
+ if (bitmapSource.getLoadingState() != BitmapSource.State.LOADED) {
+ Toast.makeText(WallpaperCropActivity.this,
+ getString(R.string.wallpaper_load_fail),
+ Toast.LENGTH_LONG).show();
+ finish();
+ }
+ }
+ };
+ setCropViewTileSource(bitmapSource, true, false, onLoad);
+ }
+
+ public void setCropViewTileSource(
+ final BitmapRegionTileSource.BitmapSource bitmapSource, final boolean touchEnabled,
+ final boolean moveToLeft, final Runnable postExecute) {
+ final Context context = WallpaperCropActivity.this;
+ final View progressView = findViewById(R.id.loading);
+ final AsyncTask<Void, Void, Void> loadBitmapTask = new AsyncTask<Void, Void, Void>() {
+ protected Void doInBackground(Void...args) {
+ if (!isCancelled()) {
+ bitmapSource.loadInBackground();
+ }
+ return null;
+ }
+ protected void onPostExecute(Void arg) {
+ if (!isCancelled()) {
+ progressView.setVisibility(View.INVISIBLE);
+ if (bitmapSource.getLoadingState() == BitmapSource.State.LOADED) {
+ mCropView.setTileSource(
+ new BitmapRegionTileSource(context, bitmapSource), null);
+ mCropView.setTouchEnabled(touchEnabled);
+ if (moveToLeft) {
+ mCropView.moveToLeft();
+ }
+ }
+ }
+ if (postExecute != null) {
+ postExecute.run();
+ }
+ }
+ };
+ // We don't want to show the spinner every time we load an image, because that would be
+ // annoying; instead, only start showing the spinner if loading the image has taken
+ // longer than 1 sec (ie 1000 ms)
+ progressView.postDelayed(new Runnable() {
+ public void run() {
+ if (loadBitmapTask.getStatus() != AsyncTask.Status.FINISHED) {
+ progressView.setVisibility(View.VISIBLE);
+ }
+ }
+ }, 1000);
+ loadBitmapTask.execute();
}
public boolean enableRotation() {
@@ -192,16 +247,18 @@
private static int getRotationFromExifHelper(
String path, Resources res, int resId, Context context, Uri uri) {
ExifInterface ei = new ExifInterface();
+ InputStream is = null;
+ BufferedInputStream bis = null;
try {
if (path != null) {
ei.readExif(path);
} else if (uri != null) {
- InputStream is = context.getContentResolver().openInputStream(uri);
- BufferedInputStream bis = new BufferedInputStream(is);
+ is = context.getContentResolver().openInputStream(uri);
+ bis = new BufferedInputStream(is);
ei.readExif(bis);
} else {
- InputStream is = res.openRawResource(resId);
- BufferedInputStream bis = new BufferedInputStream(is);
+ is = res.openRawResource(resId);
+ bis = new BufferedInputStream(is);
ei.readExif(bis);
}
Integer ori = ei.getTagIntValue(ExifInterface.TAG_ORIENTATION);
@@ -210,6 +267,9 @@
}
} catch (IOException e) {
Log.w(LOGTAG, "Getting exif data failed", e);
+ } finally {
+ Utils.closeSilently(bis);
+ Utils.closeSilently(is);
}
return 0;
}
@@ -269,40 +329,15 @@
// Get the crop
boolean ltr = mCropView.getLayoutDirection() == View.LAYOUT_DIRECTION_LTR;
- Point minDims = new Point();
- Point maxDims = new Point();
+
Display d = getWindowManager().getDefaultDisplay();
- d.getCurrentSizeRange(minDims, maxDims);
Point displaySize = new Point();
d.getSize(displaySize);
-
- int maxDim = Math.max(maxDims.x, maxDims.y);
- final int minDim = Math.min(minDims.x, minDims.y);
- int defaultWallpaperWidth;
- if (isScreenLarge(getResources())) {
- defaultWallpaperWidth = (int) (maxDim *
- wallpaperTravelToScreenWidthRatio(maxDim, minDim));
- } else {
- defaultWallpaperWidth = Math.max((int)
- (minDim * WALLPAPER_SCREENS_SPAN), maxDim);
- }
-
boolean isPortrait = displaySize.x < displaySize.y;
- int portraitHeight;
- if (isPortrait) {
- portraitHeight = mCropView.getHeight();
- } else {
- // TODO: how to actually get the proper portrait height?
- // This is not quite right:
- portraitHeight = Math.max(maxDims.x, maxDims.y);
- }
- if (android.os.Build.VERSION.SDK_INT >=
- android.os.Build.VERSION_CODES.JELLY_BEAN_MR1) {
- Point realSize = new Point();
- d.getRealSize(realSize);
- portraitHeight = Math.max(realSize.x, realSize.y);
- }
+
+ Point defaultWallpaperSize = getDefaultWallpaperSize(getResources(),
+ getWindowManager());
// Get the crop
RectF cropRect = mCropView.getCrop();
int cropRotation = mCropView.getImageRotation();
@@ -321,7 +356,7 @@
// (or all the way to the left, in RTL)
float extraSpace = ltr ? rotatedInSize[0] - cropRect.right : cropRect.left;
// Cap the amount of extra width
- float maxExtraSpace = defaultWallpaperWidth / cropScale - cropRect.width();
+ float maxExtraSpace = defaultWallpaperSize.x / cropScale - cropRect.width();
extraSpace = Math.min(extraSpace, maxExtraSpace);
if (ltr) {
@@ -332,10 +367,10 @@
// ADJUST CROP HEIGHT
if (isPortrait) {
- cropRect.bottom = cropRect.top + portraitHeight / cropScale;
+ cropRect.bottom = cropRect.top + defaultWallpaperSize.y / cropScale;
} else { // LANDSCAPE
float extraPortraitHeight =
- portraitHeight / cropScale - cropRect.height();
+ defaultWallpaperSize.y / cropScale - cropRect.height();
float expandHeight =
Math.min(Math.min(rotatedInSize[1] - cropRect.bottom, cropRect.top),
extraPortraitHeight / 2);
@@ -372,7 +407,6 @@
String mInFilePath;
byte[] mInImageBytes;
int mInResId = 0;
- InputStream mInStream;
RectF mCropBounds = null;
int mOutWidth, mOutHeight;
int mRotation;
@@ -445,37 +479,36 @@
}
// Helper to setup input stream
- private void regenerateInputStream() {
+ private InputStream regenerateInputStream() {
if (mInUri == null && mInResId == 0 && mInFilePath == null && mInImageBytes == null) {
Log.w(LOGTAG, "cannot read original file, no input URI, resource ID, or " +
"image byte array given");
} else {
- Utils.closeSilently(mInStream);
try {
if (mInUri != null) {
- mInStream = new BufferedInputStream(
+ return new BufferedInputStream(
mContext.getContentResolver().openInputStream(mInUri));
} else if (mInFilePath != null) {
- mInStream = mContext.openFileInput(mInFilePath);
+ return mContext.openFileInput(mInFilePath);
} else if (mInImageBytes != null) {
- mInStream = new BufferedInputStream(
- new ByteArrayInputStream(mInImageBytes));
+ return new BufferedInputStream(new ByteArrayInputStream(mInImageBytes));
} else {
- mInStream = new BufferedInputStream(
- mResources.openRawResource(mInResId));
+ return new BufferedInputStream(mResources.openRawResource(mInResId));
}
} catch (FileNotFoundException e) {
Log.w(LOGTAG, "cannot read file: " + mInUri.toString(), e);
}
}
+ return null;
}
public Point getImageBounds() {
- regenerateInputStream();
- if (mInStream != null) {
+ InputStream is = regenerateInputStream();
+ if (is != null) {
BitmapFactory.Options options = new BitmapFactory.Options();
options.inJustDecodeBounds = true;
- BitmapFactory.decodeStream(mInStream, null, options);
+ BitmapFactory.decodeStream(is, null, options);
+ Utils.closeSilently(is);
if (options.outWidth != 0 && options.outHeight != 0) {
return new Point(options.outWidth, options.outHeight);
}
@@ -493,22 +526,26 @@
public boolean cropBitmap() {
boolean failure = false;
- regenerateInputStream();
WallpaperManager wallpaperManager = null;
if (mSetWallpaper) {
wallpaperManager = WallpaperManager.getInstance(mContext.getApplicationContext());
}
- if (mSetWallpaper && mNoCrop && mInStream != null) {
+
+
+ if (mSetWallpaper && mNoCrop) {
try {
- wallpaperManager.setStream(mInStream);
+ InputStream is = regenerateInputStream();
+ if (is != null) {
+ wallpaperManager.setStream(is);
+ Utils.closeSilently(is);
+ }
} catch (IOException e) {
Log.w(LOGTAG, "cannot write stream to wallpaper", e);
failure = true;
}
return !failure;
- }
- if (mInStream != null) {
+ } else {
// Find crop bounds (scaled to original image size)
Rect roundedTrueCrop = new Rect();
Matrix rotateMatrix = new Matrix();
@@ -521,6 +558,11 @@
mCropBounds = new RectF(roundedTrueCrop);
Point bounds = getImageBounds();
+ if (bounds == null) {
+ Log.w(LOGTAG, "cannot get bounds for image");
+ failure = true;
+ return false;
+ }
float[] rotatedBounds = new float[] { bounds.x, bounds.y };
rotateMatrix.mapPoints(rotatedBounds);
@@ -531,7 +573,6 @@
inverseRotateMatrix.mapRect(mCropBounds);
mCropBounds.offset(bounds.x/2, bounds.y/2);
- regenerateInputStream();
}
mCropBounds.roundOut(roundedTrueCrop);
@@ -543,15 +584,25 @@
}
// See how much we're reducing the size of the image
- int scaleDownSampleSize = Math.min(roundedTrueCrop.width() / mOutWidth,
- roundedTrueCrop.height() / mOutHeight);
-
+ int scaleDownSampleSize = Math.max(1, Math.min(roundedTrueCrop.width() / mOutWidth,
+ roundedTrueCrop.height() / mOutHeight));
// Attempt to open a region decoder
BitmapRegionDecoder decoder = null;
+ InputStream is = null;
try {
- decoder = BitmapRegionDecoder.newInstance(mInStream, true);
+ is = regenerateInputStream();
+ if (is == null) {
+ Log.w(LOGTAG, "cannot get input stream for uri=" + mInUri.toString());
+ failure = true;
+ return false;
+ }
+ decoder = BitmapRegionDecoder.newInstance(is, false);
+ Utils.closeSilently(is);
} catch (IOException e) {
Log.w(LOGTAG, "cannot open region decoder for file: " + mInUri.toString(), e);
+ } finally {
+ Utils.closeSilently(is);
+ is = null;
}
Bitmap crop = null;
@@ -567,14 +618,15 @@
if (crop == null) {
// BitmapRegionDecoder has failed, try to crop in-memory
- regenerateInputStream();
+ is = regenerateInputStream();
Bitmap fullSize = null;
- if (mInStream != null) {
+ if (is != null) {
BitmapFactory.Options options = new BitmapFactory.Options();
if (scaleDownSampleSize > 1) {
options.inSampleSize = scaleDownSampleSize;
}
- fullSize = BitmapFactory.decodeStream(mInStream, null, options);
+ fullSize = BitmapFactory.decodeStream(is, null, options);
+ Utils.closeSilently(is);
}
if (fullSize != null) {
mCropBounds.left /= scaleDownSampleSize;
@@ -686,7 +738,7 @@
protected void updateWallpaperDimensions(int width, int height) {
String spKey = getSharedPreferencesKey();
- SharedPreferences sp = getSharedPreferences(spKey, Context.MODE_PRIVATE);
+ SharedPreferences sp = getSharedPreferences(spKey, Context.MODE_MULTI_PROCESS);
SharedPreferences.Editor editor = sp.edit();
if (width != 0 && height != 0) {
editor.putInt(WALLPAPER_WIDTH_KEY, width);
diff --git a/src/com/android/launcher3/WallpaperPickerActivity.java b/src/com/android/launcher3/WallpaperPickerActivity.java
index e71a26b..efc3110 100644
--- a/src/com/android/launcher3/WallpaperPickerActivity.java
+++ b/src/com/android/launcher3/WallpaperPickerActivity.java
@@ -31,7 +31,9 @@
import android.database.DataSetObserver;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
+import android.graphics.Canvas;
import android.graphics.Matrix;
+import android.graphics.Paint;
import android.graphics.Point;
import android.graphics.PorterDuff;
import android.graphics.Rect;
@@ -40,6 +42,8 @@
import android.graphics.drawable.Drawable;
import android.graphics.drawable.LevelListDrawable;
import android.net.Uri;
+import android.os.AsyncTask;
+import android.os.Build;
import android.os.Bundle;
import android.provider.MediaStore;
import android.util.Log;
@@ -51,10 +55,10 @@
import android.view.MenuItem;
import android.view.View;
import android.view.View.OnClickListener;
+import android.view.View.OnLayoutChangeListener;
import android.view.ViewGroup;
import android.view.ViewTreeObserver;
import android.view.ViewTreeObserver.OnGlobalLayoutListener;
-import android.view.accessibility.AccessibilityEvent;
import android.view.animation.AccelerateInterpolator;
import android.view.animation.DecelerateInterpolator;
import android.widget.BaseAdapter;
@@ -63,15 +67,14 @@
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ListAdapter;
+import android.widget.Toast;
-import com.android.gallery3d.exif.ExifInterface;
import com.android.photos.BitmapRegionTileSource;
+import com.android.photos.BitmapRegionTileSource.BitmapSource;
-import java.io.BufferedInputStream;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
-import java.io.InputStream;
import java.util.ArrayList;
public class WallpaperPickerActivity extends WallpaperCropActivity {
@@ -81,8 +84,9 @@
public static final int PICK_WALLPAPER_THIRD_PARTY_ACTIVITY = 6;
public static final int PICK_LIVE_WALLPAPER = 7;
private static final String TEMP_WALLPAPER_TILES = "TEMP_WALLPAPER_TILES";
+ private static final String DEFAULT_WALLPAPER_THUMBNAIL_FILENAME = "default_thumb.jpg";
- private View mSelectedThumb;
+ private View mSelectedTile;
private boolean mIgnoreNextTap;
private OnClickListener mThumbnailOnClickListener;
@@ -126,15 +130,39 @@
public static class UriWallpaperInfo extends WallpaperTileInfo {
private Uri mUri;
+ private boolean mFirstClick = true;
+ private BitmapRegionTileSource.UriBitmapSource mBitmapSource;
public UriWallpaperInfo(Uri uri) {
mUri = uri;
}
@Override
- public void onClick(WallpaperPickerActivity a) {
- CropView v = a.getCropView();
- int rotation = WallpaperCropActivity.getRotationFromExif(a, mUri);
- v.setTileSource(new BitmapRegionTileSource(a, mUri, 1024, rotation), null);
- v.setTouchEnabled(true);
+ public void onClick(final WallpaperPickerActivity a) {
+ final Runnable onLoad;
+ if (!mFirstClick) {
+ onLoad = null;
+ } else {
+ mFirstClick = false;
+ onLoad = new Runnable() {
+ public void run() {
+ if (mBitmapSource != null &&
+ mBitmapSource.getLoadingState() == BitmapSource.State.LOADED) {
+ mView.setVisibility(View.VISIBLE);
+ a.selectTile(mView);
+ } else {
+ ViewGroup parent = (ViewGroup) mView.getParent();
+ if (parent != null) {
+ parent.removeView(mView);
+ Toast.makeText(a,
+ a.getString(R.string.image_load_fail),
+ Toast.LENGTH_SHORT).show();
+ }
+ }
+ }
+ };
+ }
+ mBitmapSource = new BitmapRegionTileSource.UriBitmapSource(
+ a, mUri, BitmapRegionTileSource.MAX_PREVIEW_SIZE);
+ a.setCropViewTileSource(mBitmapSource, true, false, onLoad);
}
@Override
public void onSave(final WallpaperPickerActivity a) {
@@ -172,9 +200,11 @@
}
@Override
public void onClick(WallpaperPickerActivity a) {
- int rotation = WallpaperCropActivity.getRotationFromExif(mResources, mResId);
- BitmapRegionTileSource source = new BitmapRegionTileSource(
- mResources, a, mResId, 1024, rotation);
+ BitmapRegionTileSource.ResourceBitmapSource bitmapSource =
+ new BitmapRegionTileSource.ResourceBitmapSource(
+ mResources, mResId, BitmapRegionTileSource.MAX_PREVIEW_SIZE);
+ bitmapSource.loadInBackground();
+ BitmapRegionTileSource source = new BitmapRegionTileSource(a, bitmapSource);
CropView v = a.getCropView();
v.setTileSource(source, null);
Point wallpaperSize = WallpaperCropActivity.getDefaultWallpaperSize(
@@ -200,6 +230,42 @@
}
}
+ public static class DefaultWallpaperInfo extends WallpaperTileInfo {
+ public Drawable mThumb;
+ public DefaultWallpaperInfo(Drawable thumb) {
+ mThumb = thumb;
+ }
+ @Override
+ public void onClick(WallpaperPickerActivity a) {
+ CropView c = a.getCropView();
+
+ Drawable defaultWallpaper = WallpaperManager.getInstance(a).getBuiltInDrawable(
+ c.getWidth(), c.getHeight(), false, 0.5f, 0.5f);
+
+ c.setTileSource(
+ new DrawableTileSource(a, defaultWallpaper, DrawableTileSource.MAX_PREVIEW_SIZE), null);
+ c.setScale(1f);
+ c.setTouchEnabled(false);
+ }
+ @Override
+ public void onSave(WallpaperPickerActivity a) {
+ try {
+ WallpaperManager.getInstance(a).clear();
+ } catch (IOException e) {
+ Log.w("Setting wallpaper to default threw exception", e);
+ }
+ a.finish();
+ }
+ @Override
+ public boolean isSelectable() {
+ return true;
+ }
+ @Override
+ public boolean isNamelessWallpaper() {
+ return true;
+ }
+ }
+
public void setWallpaperStripYOffset(float offset) {
mWallpaperStrip.setPadding(0, 0, 0, (int) offset);
}
@@ -266,17 +332,8 @@
return;
}
WallpaperTileInfo info = (WallpaperTileInfo) v.getTag();
- if (info.isSelectable()) {
- if (mSelectedThumb != null) {
- mSelectedThumb.setSelected(false);
- mSelectedThumb = null;
- }
- mSelectedThumb = v;
- v.setSelected(true);
- // TODO: Remove this once the accessibility framework and
- // services have better support for selection state.
- v.announceForAccessibility(
- getString(R.string.announce_selection, v.getContentDescription()));
+ if (info.isSelectable() && v.getVisibility() == View.VISIBLE) {
+ selectTile(v);
}
info.onClick(WallpaperPickerActivity.this);
}
@@ -305,12 +362,12 @@
ArrayList<ResourceWallpaperInfo> wallpapers = findBundledWallpapers();
mWallpapersView = (LinearLayout) findViewById(R.id.wallpaper_list);
BuiltInWallpapersAdapter ia = new BuiltInWallpapersAdapter(this, wallpapers);
- populateWallpapersFromAdapter(mWallpapersView, ia, false, true);
+ populateWallpapersFromAdapter(mWallpapersView, ia, false);
// Populate the saved wallpapers
mSavedImages = new SavedWallpaperImages(this);
mSavedImages.loadThumbnailsAndImageIdList();
- populateWallpapersFromAdapter(mWallpapersView, mSavedImages, true, true);
+ populateWallpapersFromAdapter(mWallpapersView, mSavedImages, true);
// Populate the live wallpapers
final LinearLayout liveWallpapersView =
@@ -319,7 +376,7 @@
a.registerDataSetObserver(new DataSetObserver() {
public void onChanged() {
liveWallpapersView.removeAllViews();
- populateWallpapersFromAdapter(liveWallpapersView, a, false, false);
+ populateWallpapersFromAdapter(liveWallpapersView, a, false);
initializeScrollForRtl();
updateTileIndices();
}
@@ -330,7 +387,7 @@
(LinearLayout) findViewById(R.id.third_party_wallpaper_list);
final ThirdPartyWallpaperPickerListAdapter ta =
new ThirdPartyWallpaperPickerListAdapter(this);
- populateWallpapersFromAdapter(thirdPartyWallpapersView, ta, false, false);
+ populateWallpapersFromAdapter(thirdPartyWallpapersView, ta, false);
// Add a tile for the Gallery
LinearLayout masterWallpaperList = (LinearLayout) findViewById(R.id.master_wallpaper_list);
@@ -354,7 +411,33 @@
pickImageTile.setTag(pickImageInfo);
pickImageInfo.setView(pickImageTile);
pickImageTile.setOnClickListener(mThumbnailOnClickListener);
- pickImageInfo.setView(pickImageTile);
+
+ // Add a tile for the default wallpaper
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
+ DefaultWallpaperInfo defaultWallpaperInfo = getDefaultWallpaper();
+ FrameLayout defaultWallpaperTile = (FrameLayout) createImageTileView(
+ getLayoutInflater(), 0, null, mWallpapersView, defaultWallpaperInfo.mThumb);
+ setWallpaperItemPaddingToZero(defaultWallpaperTile);
+ defaultWallpaperTile.setTag(defaultWallpaperInfo);
+ mWallpapersView.addView(defaultWallpaperTile, 0);
+ defaultWallpaperTile.setOnClickListener(mThumbnailOnClickListener);
+ defaultWallpaperInfo.setView(defaultWallpaperTile);
+ }
+
+ // Select the first item; wait for a layout pass so that we initialize the dimensions of
+ // cropView or the defaultWallpaperView first
+ mCropView.addOnLayoutChangeListener(new OnLayoutChangeListener() {
+ @Override
+ public void onLayoutChange(View v, int left, int top, int right, int bottom,
+ int oldLeft, int oldTop, int oldRight, int oldBottom) {
+ if ((right - left) > 0 && (bottom - top) > 0) {
+ if (mWallpapersView.getChildCount() > 0) {
+ mThumbnailOnClickListener.onClick(mWallpapersView.getChildAt(0));
+ }
+ v.removeOnLayoutChangeListener(this);
+ }
+ }
+ });
updateTileIndices();
@@ -376,8 +459,8 @@
new View.OnClickListener() {
@Override
public void onClick(View v) {
- if (mSelectedThumb != null) {
- WallpaperTileInfo info = (WallpaperTileInfo) mSelectedThumb.getTag();
+ if (mSelectedTile != null) {
+ WallpaperTileInfo info = (WallpaperTileInfo) mSelectedTile.getTag();
info.onSave(WallpaperPickerActivity.this);
}
}
@@ -456,12 +539,25 @@
CheckableFrameLayout c = (CheckableFrameLayout) mWallpapersView.getChildAt(i);
c.setChecked(false);
}
- mSelectedThumb.setSelected(true);
+ mSelectedTile.setSelected(true);
mActionMode = null;
}
};
}
+ private void selectTile(View v) {
+ if (mSelectedTile != null) {
+ mSelectedTile.setSelected(false);
+ mSelectedTile = null;
+ }
+ mSelectedTile = v;
+ v.setSelected(true);
+ // TODO: Remove this once the accessibility framework and
+ // services have better support for selection state.
+ v.announceForAccessibility(
+ getString(R.string.announce_selection, v.getContentDescription()));
+ }
+
private void initializeScrollForRtl() {
final HorizontalScrollView scroll =
(HorizontalScrollView) findViewById(R.id.wallpaper_scroll_container);
@@ -520,7 +616,7 @@
}
private void populateWallpapersFromAdapter(ViewGroup parent, BaseAdapter adapter,
- boolean addLongPressHandler, boolean selectFirstTile) {
+ boolean addLongPressHandler) {
for (int i = 0; i < adapter.getCount(); i++) {
FrameLayout thumbnail = (FrameLayout) adapter.getView(i, null, parent);
parent.addView(thumbnail, i);
@@ -531,9 +627,6 @@
addLongPressHandler(thumbnail);
}
thumbnail.setOnClickListener(mThumbnailOnClickListener);
- if (i == 0 && selectFirstTile) {
- mThumbnailOnClickListener.onClick(thumbnail);
- }
}
}
@@ -623,26 +716,35 @@
}
}
- private void addTemporaryWallpaperTile(Uri uri) {
+ private void addTemporaryWallpaperTile(final Uri uri) {
mTempWallpaperTiles.add(uri);
// Add a tile for the image picked from Gallery
- FrameLayout pickedImageThumbnail = (FrameLayout) getLayoutInflater().
+ final FrameLayout pickedImageThumbnail = (FrameLayout) getLayoutInflater().
inflate(R.layout.wallpaper_picker_item, mWallpapersView, false);
+ pickedImageThumbnail.setVisibility(View.GONE);
setWallpaperItemPaddingToZero(pickedImageThumbnail);
+ mWallpapersView.addView(pickedImageThumbnail, 0);
// Load the thumbnail
- ImageView image = (ImageView) pickedImageThumbnail.findViewById(R.id.wallpaper_image);
- Point defaultSize = getDefaultThumbnailSize(this.getResources());
- int rotation = WallpaperCropActivity.getRotationFromExif(this, uri);
- Bitmap thumb = createThumbnail(defaultSize, this, uri, null, null, 0, rotation, false);
- if (thumb != null) {
- image.setImageBitmap(thumb);
- Drawable thumbDrawable = image.getDrawable();
- thumbDrawable.setDither(true);
- } else {
- Log.e(TAG, "Error loading thumbnail for uri=" + uri);
- }
- mWallpapersView.addView(pickedImageThumbnail, 0);
+ final ImageView image = (ImageView) pickedImageThumbnail.findViewById(R.id.wallpaper_image);
+ final Point defaultSize = getDefaultThumbnailSize(this.getResources());
+ final Context context = this;
+ new AsyncTask<Void, Bitmap, Bitmap>() {
+ protected Bitmap doInBackground(Void...args) {
+ int rotation = WallpaperCropActivity.getRotationFromExif(context, uri);
+ return createThumbnail(defaultSize, context, uri, null, null, 0, rotation, false);
+
+ }
+ protected void onPostExecute(Bitmap thumb) {
+ if (thumb != null) {
+ image.setImageBitmap(thumb);
+ Drawable thumbDrawable = image.getDrawable();
+ thumbDrawable.setDither(true);
+ } else {
+ Log.e(TAG, "Error loading thumbnail for uri=" + uri);
+ }
+ }
+ }.execute();
UriWallpaperInfo info = new UriWallpaperInfo(uri);
pickedImageThumbnail.setTag(info);
@@ -700,18 +802,35 @@
}
// Add an entry for the default wallpaper (stored in system resources)
- ResourceWallpaperInfo defaultWallpaperInfo = getDefaultWallpaperInfo();
- if (defaultWallpaperInfo != null) {
- bundledWallpapers.add(0, defaultWallpaperInfo);
+ if (Build.VERSION.SDK_INT < Build.VERSION_CODES.KITKAT) {
+ ResourceWallpaperInfo defaultWallpaperInfo = getPreKKDefaultWallpaperInfo();
+ if (defaultWallpaperInfo != null) {
+ bundledWallpapers.add(0, defaultWallpaperInfo);
+ }
}
return bundledWallpapers;
}
- private ResourceWallpaperInfo getDefaultWallpaperInfo() {
+ private boolean writeImageToFileAsJpeg(File f, Bitmap b) {
+ try {
+ f.createNewFile();
+ FileOutputStream thumbFileStream =
+ openFileOutput(f.getName(), Context.MODE_PRIVATE);
+ b.compress(Bitmap.CompressFormat.JPEG, 95, thumbFileStream);
+ thumbFileStream.close();
+ return true;
+ } catch (IOException e) {
+ Log.e(TAG, "Error while writing bitmap to file " + e);
+ f.delete();
+ }
+ return false;
+ }
+
+ private ResourceWallpaperInfo getPreKKDefaultWallpaperInfo() {
Resources sysRes = Resources.getSystem();
int resId = sysRes.getIdentifier("default_wallpaper", "drawable", "android");
- File defaultThumbFile = new File(getFilesDir(), "default_thumb.jpg");
+ File defaultThumbFile = new File(getFilesDir(), DEFAULT_WALLPAPER_THUMBNAIL_FILENAME);
Bitmap thumb = null;
boolean defaultWallpaperExists = false;
if (defaultThumbFile.exists()) {
@@ -724,17 +843,7 @@
thumb = createThumbnail(
defaultThumbSize, this, null, null, sysRes, resId, rotation, false);
if (thumb != null) {
- try {
- defaultThumbFile.createNewFile();
- FileOutputStream thumbFileStream =
- openFileOutput(defaultThumbFile.getName(), Context.MODE_PRIVATE);
- thumb.compress(Bitmap.CompressFormat.JPEG, 95, thumbFileStream);
- thumbFileStream.close();
- defaultWallpaperExists = true;
- } catch (IOException e) {
- Log.e(TAG, "Error while writing default wallpaper thumbnail to file " + e);
- defaultThumbFile.delete();
- }
+ defaultWallpaperExists = writeImageToFileAsJpeg(defaultThumbFile, thumb);
}
}
if (defaultWallpaperExists) {
@@ -743,6 +852,37 @@
return null;
}
+ private DefaultWallpaperInfo getDefaultWallpaper() {
+ File defaultThumbFile = new File(getFilesDir(), DEFAULT_WALLPAPER_THUMBNAIL_FILENAME);
+ Bitmap thumb = null;
+ boolean defaultWallpaperExists = false;
+ if (defaultThumbFile.exists()) {
+ thumb = BitmapFactory.decodeFile(defaultThumbFile.getAbsolutePath());
+ defaultWallpaperExists = true;
+ } else {
+ Resources res = getResources();
+ Point defaultThumbSize = getDefaultThumbnailSize(res);
+ Paint p = new Paint();
+ p.setFilterBitmap(true);
+ Drawable wallpaperDrawable = WallpaperManager.getInstance(this).getBuiltInDrawable(
+ defaultThumbSize.x, defaultThumbSize.y, true, 0.5f, 0.5f);
+ if (wallpaperDrawable != null) {
+ thumb = Bitmap.createBitmap(
+ defaultThumbSize.x, defaultThumbSize.y, Bitmap.Config.ARGB_8888);
+ Canvas c = new Canvas(thumb);
+ wallpaperDrawable.draw(c);
+ c.setBitmap(null);
+ }
+ if (thumb != null) {
+ defaultWallpaperExists = writeImageToFileAsJpeg(defaultThumbFile, thumb);
+ }
+ }
+ if (defaultWallpaperExists) {
+ return new DefaultWallpaperInfo(new BitmapDrawable(thumb));
+ }
+ return null;
+ }
+
public Pair<ApplicationInfo, Integer> getWallpaperArrayResourceId() {
// Context.getPackageName() may return the "original" package name,
// com.android.launcher3; Resources needs the real package name,
diff --git a/src/com/android/launcher3/WidgetPreviewLoader.java b/src/com/android/launcher3/WidgetPreviewLoader.java
index 07b4f6f..7e1ad6d 100644
--- a/src/com/android/launcher3/WidgetPreviewLoader.java
+++ b/src/com/android/launcher3/WidgetPreviewLoader.java
@@ -4,6 +4,7 @@
import android.content.ComponentName;
import android.content.ContentValues;
import android.content.Context;
+import android.content.SharedPreferences;
import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
import android.content.res.Resources;
@@ -100,6 +101,7 @@
public class WidgetPreviewLoader {
static final String TAG = "WidgetPreviewLoader";
+ static final String ANDROID_INCREMENTAL_VERSION_NAME_KEY = "android.incremental.version";
private int mPreviewBitmapWidth;
private int mPreviewBitmapHeight;
@@ -147,6 +149,20 @@
mDb = app.getWidgetPreviewCacheDb();
mLoadedPreviews = new HashMap<String, WeakReference<Bitmap>>();
mUnusedBitmaps = new ArrayList<SoftReference<Bitmap>>();
+
+ SharedPreferences sp = context.getSharedPreferences(
+ LauncherAppState.getSharedPreferencesKey(), Context.MODE_PRIVATE);
+ final String lastVersionName = sp.getString(ANDROID_INCREMENTAL_VERSION_NAME_KEY, null);
+ final String versionName = android.os.Build.VERSION.INCREMENTAL;
+ if (!versionName.equals(lastVersionName)) {
+ // clear all the previews whenever the system version changes, to ensure that previews
+ // are up-to-date for any apps that might have been updated with the system
+ clearDb();
+
+ SharedPreferences.Editor editor = sp.edit();
+ editor.putString(ANDROID_INCREMENTAL_VERSION_NAME_KEY, versionName);
+ editor.commit();
+ }
}
public void setPreviewSize(int previewWidth, int previewHeight,
@@ -334,6 +350,12 @@
db.insert(CacheDb.TABLE_NAME, null, values);
}
+ private void clearDb() {
+ SQLiteDatabase db = mDb.getWritableDatabase();
+ // Delete everything
+ db.delete(CacheDb.TABLE_NAME, null, null);
+ }
+
public static void removePackageFromDb(final CacheDb cacheDb, final String packageName) {
synchronized(sInvalidPackages) {
sInvalidPackages.add(packageName);
diff --git a/src/com/android/launcher3/Workspace.java b/src/com/android/launcher3/Workspace.java
index f6416c8..8c2c89d 100644
--- a/src/com/android/launcher3/Workspace.java
+++ b/src/com/android/launcher3/Workspace.java
@@ -22,6 +22,7 @@
import android.animation.AnimatorSet;
import android.animation.LayoutTransition;
import android.animation.ObjectAnimator;
+import android.animation.PropertyValuesHolder;
import android.animation.TimeInterpolator;
import android.animation.ValueAnimator;
import android.animation.ValueAnimator.AnimatorUpdateListener;
@@ -89,6 +90,9 @@
private static final int CHILDREN_OUTLINE_FADE_OUT_DURATION = 375;
private static final int CHILDREN_OUTLINE_FADE_IN_DURATION = 100;
+ protected static final int SNAP_OFF_EMPTY_SCREEN_DURATION = 400;
+ protected static final int FADE_EMPTY_SCREEN_DURATION = 150;
+
private static final int BACKGROUND_FADE_OUT_DURATION = 350;
private static final int ADJACENT_SCREEN_DROP_DURATION = 300;
private static final int FLING_THRESHOLD_VELOCITY = 500;
@@ -128,6 +132,8 @@
private HashMap<Long, CellLayout> mWorkspaceScreens = new HashMap<Long, CellLayout>();
private ArrayList<Long> mScreenOrder = new ArrayList<Long>();
+ private Runnable mRemoveEmptyScreenRunnable;
+
/**
* CellInfo for the cell that is currently being dragged
*/
@@ -304,7 +310,8 @@
mLauncher = (Launcher) context;
final Resources res = getResources();
- mWorkspaceFadeInAdjacentScreens = res.getBoolean(R.bool.config_workspaceFadeAdjacentScreens);
+ mWorkspaceFadeInAdjacentScreens = LauncherAppState.getInstance().getDynamicGrid().
+ getDeviceProfile().shouldFadeAdjacentWorkspaceScreens();
mFadeInAdjacentScreens = false;
mWallpaperManager = WallpaperManager.getInstance(context);
@@ -392,7 +399,6 @@
InstallShortcutReceiver.disableAndFlushInstallQueue(getContext());
UninstallShortcutReceiver.disableAndFlushUninstallQueue(getContext());
- removeExtraEmptyScreen();
mDragSourceInternal = null;
mLauncher.onInteractionEnd();
}
@@ -627,6 +633,9 @@
boolean lastChildOnScreen = false;
boolean childOnFinalScreen = false;
+ // Cancel any pending removal of empty screen
+ mRemoveEmptyScreenRunnable = null;
+
if (mDragSourceInternal != null) {
if (mDragSourceInternal.getChildCount() == 1) {
lastChildOnScreen = true;
@@ -654,15 +663,98 @@
return false;
}
- public void removeExtraEmptyScreen() {
- if (hasExtraEmptyScreen()) {
- CellLayout cl = mWorkspaceScreens.get(EXTRA_EMPTY_SCREEN_ID);
- mWorkspaceScreens.remove(EXTRA_EMPTY_SCREEN_ID);
- mScreenOrder.remove(EXTRA_EMPTY_SCREEN_ID);
- removeView(cl);
+ private void convertFinalScreenToEmptyScreenIfNecessary() {
+ if (hasExtraEmptyScreen() || mScreenOrder.size() == 0) return;
+ long finalScreenId = mScreenOrder.get(mScreenOrder.size() - 1);
+
+ if (finalScreenId == CUSTOM_CONTENT_SCREEN_ID) return;
+ CellLayout finalScreen = mWorkspaceScreens.get(finalScreenId);
+
+ // If the final screen is empty, convert it to the extra empty screen
+ if (finalScreen.getShortcutsAndWidgets().getChildCount() == 0 &&
+ !finalScreen.isDropPending()) {
+ mWorkspaceScreens.remove(finalScreenId);
+ mScreenOrder.remove(finalScreenId);
+
+ // if this is the last non-custom content screen, convert it to the empty screen
+ mWorkspaceScreens.put(EXTRA_EMPTY_SCREEN_ID, finalScreen);
+ mScreenOrder.add(EXTRA_EMPTY_SCREEN_ID);
}
}
+ public void removeExtraEmptyScreen(final boolean animate, final Runnable onComplete) {
+ removeExtraEmptyScreen(animate, onComplete, 0, false);
+ }
+
+ public void removeExtraEmptyScreen(final boolean animate, final Runnable onComplete,
+ final int delay, final boolean stripEmptyScreens) {
+ if (delay > 0) {
+ postDelayed(new Runnable() {
+ @Override
+ public void run() {
+ removeExtraEmptyScreen(animate, onComplete, 0, stripEmptyScreens);
+ }
+
+ }, delay);
+ return;
+ }
+
+ convertFinalScreenToEmptyScreenIfNecessary();
+ if (hasExtraEmptyScreen()) {
+ int emptyIndex = mScreenOrder.indexOf(EXTRA_EMPTY_SCREEN_ID);
+ if (getNextPage() == emptyIndex) {
+ snapToPage(getNextPage() - 1, SNAP_OFF_EMPTY_SCREEN_DURATION);
+ fadeAndRemoveEmptyScreen(SNAP_OFF_EMPTY_SCREEN_DURATION, FADE_EMPTY_SCREEN_DURATION,
+ onComplete, stripEmptyScreens);
+ } else {
+ fadeAndRemoveEmptyScreen(0, FADE_EMPTY_SCREEN_DURATION,
+ onComplete, stripEmptyScreens);
+ }
+ return;
+ }
+ if (onComplete != null) {
+ onComplete.run();
+ }
+ }
+
+ private void fadeAndRemoveEmptyScreen(int delay, int duration, final Runnable onComplete,
+ final boolean stripEmptyScreens) {
+ PropertyValuesHolder alpha = PropertyValuesHolder.ofFloat("alpha", 0f);
+ PropertyValuesHolder bgAlpha = PropertyValuesHolder.ofFloat("backgroundAlpha", 0f);
+
+ final CellLayout cl = mWorkspaceScreens.get(EXTRA_EMPTY_SCREEN_ID);
+
+ mRemoveEmptyScreenRunnable = new Runnable() {
+ @Override
+ public void run() {
+ if (hasExtraEmptyScreen()) {
+ mWorkspaceScreens.remove(EXTRA_EMPTY_SCREEN_ID);
+ mScreenOrder.remove(EXTRA_EMPTY_SCREEN_ID);
+ removeView(cl);
+ if (stripEmptyScreens) {
+ stripEmptyScreens();
+ }
+ }
+ }
+ };
+
+ ObjectAnimator oa = ObjectAnimator.ofPropertyValuesHolder(cl, alpha, bgAlpha);
+ oa.setDuration(duration);
+ oa.setStartDelay(delay);
+ oa.addListener(new AnimatorListenerAdapter() {
+ @Override
+ public void onAnimationEnd(Animator animation) {
+ if (mRemoveEmptyScreenRunnable != null) {
+ mRemoveEmptyScreenRunnable.run();
+ }
+ if (onComplete != null) {
+ onComplete.run();
+ }
+ }
+ });
+ oa.start();
+ }
+
public boolean hasExtraEmptyScreen() {
int nScreens = getChildCount();
nScreens = nScreens - numCustomPages();
@@ -753,6 +845,7 @@
removeView(cl);
} else {
// if this is the last non-custom content screen, convert it to the empty screen
+ mRemoveEmptyScreenRunnable = null;
mWorkspaceScreens.put(EXTRA_EMPTY_SCREEN_ID, cl);
mScreenOrder.add(EXTRA_EMPTY_SCREEN_ID);
}
@@ -1097,17 +1190,21 @@
protected void setWallpaperDimension() {
String spKey = WallpaperCropActivity.getSharedPreferencesKey();
- SharedPreferences sp = mLauncher.getSharedPreferences(spKey, Context.MODE_PRIVATE);
+ SharedPreferences sp = mLauncher.getSharedPreferences(spKey, Context.MODE_MULTI_PROCESS);
WallpaperPickerActivity.suggestWallpaperDimension(mLauncher.getResources(),
sp, mLauncher.getWindowManager(), mWallpaperManager);
}
protected void snapToPage(int whichPage, Runnable r) {
+ snapToPage(whichPage, SLOW_PAGE_SNAP_ANIMATION_DURATION, r);
+ }
+
+ protected void snapToPage(int whichPage, int duration, Runnable r) {
if (mDelayedSnapToPageRunnable != null) {
mDelayedSnapToPageRunnable.run();
}
mDelayedSnapToPageRunnable = r;
- snapToPage(whichPage, SLOW_PAGE_SNAP_ANIMATION_DURATION);
+ snapToPage(whichPage, duration);
}
protected void snapToScreenId(long screenId, Runnable r) {
@@ -1199,10 +1296,8 @@
// TODO: do different behavior if it's a live wallpaper?
// Sometimes the left parameter of the pages is animated during a layout transition;
// this parameter offsets it to keep the wallpaper from animating as well
- int offsetForLayoutTransitionAnimation = isLayoutRtl() ?
- getPageAt(getChildCount() - 1).getLeft() - getFirstChildLeft() : 0;
int adjustedScroll =
- getScrollX() - firstPageScrollX - offsetForLayoutTransitionAnimation;
+ getScrollX() - firstPageScrollX - getLayoutTransitionOffsetForPage(0);
float offset = Math.min(1, adjustedScroll / (float) scrollRange);
offset = Math.max(0, offset);
// Don't use up all the wallpaper parallax until you have at least
@@ -1395,12 +1490,6 @@
float scrollProgress = getScrollProgress(screenCenter, child, i);
float alpha = 1 - Math.abs(scrollProgress);
child.getShortcutsAndWidgets().setAlpha(alpha);
- if (!mIsDragOccuring) {
- child.setBackgroundAlphaMultiplier(
- backgroundAlphaInterpolator(Math.abs(scrollProgress)));
- } else {
- child.setBackgroundAlphaMultiplier(1f);
- }
}
}
}
@@ -2015,7 +2104,14 @@
final CellLayout cl = (CellLayout) getChildAt(i);
boolean isCurrentPage = (i == getNextPage());
float initialAlpha = cl.getShortcutsAndWidgets().getAlpha();
- float finalAlpha = stateIsSmall ? 0f : 1f;
+ float finalAlpha;
+ if (stateIsSmall) {
+ finalAlpha = 0f;
+ } else if (stateIsNormal && mWorkspaceFadeInAdjacentScreens) {
+ finalAlpha = i == getNextPage() ? 1f : 0f;
+ } else {
+ finalAlpha = 1f;
+ }
// If we are animating to/from the small state, then hide the side pages and fade the
// current page in
@@ -2728,13 +2824,13 @@
// cell also contains a shortcut, then create a folder with the two shortcuts.
if (!mInScrollArea && createUserFolderIfNecessary(cell, container,
dropTargetLayout, mTargetCell, distance, false, d.dragView, null)) {
- stripEmptyScreens();
+ removeExtraEmptyScreen(true, null, 0, true);
return;
}
if (addToExistingFolderIfNecessary(cell, dropTargetLayout, mTargetCell,
distance, d, false)) {
- stripEmptyScreens();
+ removeExtraEmptyScreen(true, null, 0, true);
return;
}
@@ -2842,7 +2938,7 @@
if (finalResizeRunnable != null) {
finalResizeRunnable.run();
}
- stripEmptyScreens();
+ removeExtraEmptyScreen(true, null, 0, true);
}
};
mAnimatingViewIntoPlace = true;
@@ -3493,7 +3589,13 @@
final Runnable exitSpringLoadedRunnable = new Runnable() {
@Override
public void run() {
- mLauncher.exitSpringLoadedDragModeDelayed(true, false, null);
+ removeExtraEmptyScreen(false, new Runnable() {
+ @Override
+ public void run() {
+ mLauncher.exitSpringLoadedDragModeDelayed(true,
+ Launcher.EXIT_SPRINGLOADED_MODE_SHORT_TIMEOUT, null);
+ }
+ });
}
};
@@ -3654,7 +3756,7 @@
// the correct final location.
setFinalTransitionTransform(cellLayout);
mLauncher.getDragLayer().animateViewIntoPosition(d.dragView, view,
- exitSpringLoadedRunnable);
+ exitSpringLoadedRunnable, this);
resetTransitionTransform(cellLayout);
}
}
@@ -3729,7 +3831,7 @@
external, scalePreview);
Resources res = mLauncher.getResources();
- int duration = res.getInteger(R.integer.config_dropAnimMaxDuration) - 200;
+ final int duration = res.getInteger(R.integer.config_dropAnimMaxDuration) - 200;
// In the case where we've prebound the widget, we remove it from the DragLayer
if (finalView instanceof AppWidgetHostView && external) {
@@ -3837,11 +3939,11 @@
final boolean isFlingToDelete, final boolean success) {
if (mDeferDropAfterUninstall) {
mDeferredAction = new Runnable() {
- public void run() {
- onDropCompleted(target, d, isFlingToDelete, success);
- mDeferredAction = null;
- }
- };
+ public void run() {
+ onDropCompleted(target, d, isFlingToDelete, success);
+ mDeferredAction = null;
+ }
+ };
return;
}
@@ -3859,7 +3961,7 @@
// If we move the item to anything not on the Workspace, check if any empty
// screens need to be removed. If we dropped back on the workspace, this will
// be done post drop animation.
- stripEmptyScreens();
+ removeExtraEmptyScreen(true, null, 0, true);
}
} else if (mDragInfo != null) {
CellLayout cellLayout;
@@ -4384,29 +4486,45 @@
stripEmptyScreens();
}
+ private void updateShortcut(HashMap<ComponentName, AppInfo> appsMap, ItemInfo info,
+ View child) {
+ ComponentName cn = info.getIntent().getComponent();
+ if (cn != null) {
+ AppInfo appInfo = appsMap.get(info.getIntent().getComponent());
+ if ((appInfo != null) && LauncherModel.isShortcutInfoUpdateable(info)) {
+ ShortcutInfo shortcutInfo = (ShortcutInfo) info;
+ BubbleTextView shortcut = (BubbleTextView) child;
+ shortcutInfo.updateIcon(mIconCache);
+ shortcutInfo.title = appInfo.title.toString();
+ shortcut.applyFromShortcutInfo(shortcutInfo, mIconCache);
+ }
+ }
+ }
+
void updateShortcuts(ArrayList<AppInfo> apps) {
+ // Create a map of the apps to test against
+ final HashMap<ComponentName, AppInfo> appsMap = new HashMap<ComponentName, AppInfo>();
+ for (AppInfo ai : apps) {
+ appsMap.put(ai.componentName, ai);
+ }
+
ArrayList<ShortcutAndWidgetContainer> childrenLayouts = getAllShortcutAndWidgetContainers();
for (ShortcutAndWidgetContainer layout: childrenLayouts) {
- int childCount = layout.getChildCount();
- for (int j = 0; j < childCount; j++) {
- final View view = layout.getChildAt(j);
- Object tag = view.getTag();
-
- if (LauncherModel.isShortcutInfoUpdateable((ItemInfo) tag)) {
- ShortcutInfo info = (ShortcutInfo) tag;
-
- final Intent intent = info.intent;
- final ComponentName name = intent.getComponent();
- final int appCount = apps.size();
- for (int k = 0; k < appCount; k++) {
- AppInfo app = apps.get(k);
- if (app.componentName.equals(name)) {
- BubbleTextView shortcut = (BubbleTextView) view;
- info.updateIcon(mIconCache);
- info.title = app.title.toString();
- shortcut.applyFromShortcutInfo(info, mIconCache);
- }
+ // Update all the children shortcuts
+ final HashMap<ItemInfo, View> children = new HashMap<ItemInfo, View>();
+ for (int j = 0; j < layout.getChildCount(); j++) {
+ View v = layout.getChildAt(j);
+ ItemInfo info = (ItemInfo) v.getTag();
+ if (info instanceof FolderInfo && v instanceof FolderIcon) {
+ FolderIcon folder = (FolderIcon) v;
+ ArrayList<View> folderChildren = folder.getFolder().getItemsInReadingOrder();
+ for (View fv : folderChildren) {
+ info = (ItemInfo) fv.getTag();
+ updateShortcut(appsMap, info, fv);
}
+ folder.invalidate();
+ } else if (info instanceof ShortcutInfo) {
+ updateShortcut(appsMap, info, v);
}
}
}
diff --git a/src/com/android/photos/BitmapRegionTileSource.java b/src/com/android/photos/BitmapRegionTileSource.java
index 5f64018..2f203af 100644
--- a/src/com/android/photos/BitmapRegionTileSource.java
+++ b/src/com/android/photos/BitmapRegionTileSource.java
@@ -24,6 +24,9 @@
import android.graphics.BitmapFactory;
import android.graphics.BitmapRegionDecoder;
import android.graphics.Canvas;
+import android.graphics.Matrix;
+import android.graphics.Paint;
+import android.graphics.PorterDuff;
import android.graphics.Rect;
import android.net.Uri;
import android.os.Build;
@@ -31,14 +34,114 @@
import android.util.Log;
import com.android.gallery3d.common.BitmapUtils;
+import com.android.gallery3d.common.Utils;
+import com.android.gallery3d.exif.ExifInterface;
import com.android.gallery3d.glrenderer.BasicTexture;
import com.android.gallery3d.glrenderer.BitmapTexture;
import com.android.photos.views.TiledImageRenderer;
import java.io.BufferedInputStream;
+import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
+interface SimpleBitmapRegionDecoder {
+ int getWidth();
+ int getHeight();
+ Bitmap decodeRegion(Rect wantRegion, BitmapFactory.Options options);
+}
+
+class SimpleBitmapRegionDecoderWrapper implements SimpleBitmapRegionDecoder {
+ BitmapRegionDecoder mDecoder;
+ private SimpleBitmapRegionDecoderWrapper(BitmapRegionDecoder decoder) {
+ mDecoder = decoder;
+ }
+ public static SimpleBitmapRegionDecoderWrapper newInstance(
+ String pathName, boolean isShareable) {
+ try {
+ BitmapRegionDecoder d = BitmapRegionDecoder.newInstance(pathName, isShareable);
+ if (d != null) {
+ return new SimpleBitmapRegionDecoderWrapper(d);
+ }
+ } catch (IOException e) {
+ Log.w("BitmapRegionTileSource", "getting decoder failed for path " + pathName, e);
+ return null;
+ }
+ return null;
+ }
+ public static SimpleBitmapRegionDecoderWrapper newInstance(
+ InputStream is, boolean isShareable) {
+ try {
+ BitmapRegionDecoder d = BitmapRegionDecoder.newInstance(is, isShareable);
+ if (d != null) {
+ return new SimpleBitmapRegionDecoderWrapper(d);
+ }
+ } catch (IOException e) {
+ Log.w("BitmapRegionTileSource", "getting decoder failed", e);
+ return null;
+ }
+ return null;
+ }
+ public int getWidth() {
+ return mDecoder.getWidth();
+ }
+ public int getHeight() {
+ return mDecoder.getHeight();
+ }
+ public Bitmap decodeRegion(Rect wantRegion, BitmapFactory.Options options) {
+ return mDecoder.decodeRegion(wantRegion, options);
+ }
+}
+
+class DumbBitmapRegionDecoder implements SimpleBitmapRegionDecoder {
+ //byte[] mStreamCopy;
+ Bitmap mBuffer;
+ Canvas mTempCanvas;
+ Paint mTempPaint;
+ private DumbBitmapRegionDecoder(Bitmap b) {
+ mBuffer = b;
+ }
+ public static DumbBitmapRegionDecoder newInstance(String pathName) {
+ Bitmap b = BitmapFactory.decodeFile(pathName);
+ if (b != null) {
+ return new DumbBitmapRegionDecoder(b);
+ }
+ return null;
+ }
+ public static DumbBitmapRegionDecoder newInstance(InputStream is) {
+ Bitmap b = BitmapFactory.decodeStream(is);
+ if (b != null) {
+ return new DumbBitmapRegionDecoder(b);
+ }
+ return null;
+ }
+ public int getWidth() {
+ return mBuffer.getWidth();
+ }
+ public int getHeight() {
+ return mBuffer.getHeight();
+ }
+ public Bitmap decodeRegion(Rect wantRegion, BitmapFactory.Options options) {
+ if (mTempCanvas == null) {
+ mTempCanvas = new Canvas();
+ mTempPaint = new Paint();
+ mTempPaint.setFilterBitmap(true);
+ }
+ int sampleSize = Math.max(options.inSampleSize, 1);
+ Bitmap newBitmap = Bitmap.createBitmap(
+ wantRegion.width() / sampleSize,
+ wantRegion.height() / sampleSize,
+ Bitmap.Config.ARGB_8888);
+ mTempCanvas.setBitmap(newBitmap);
+ mTempCanvas.save();
+ mTempCanvas.scale(1f / sampleSize, 1f / sampleSize);
+ mTempCanvas.drawBitmap(mBuffer, -wantRegion.left, -wantRegion.top, mTempPaint);
+ mTempCanvas.restore();
+ mTempCanvas.setBitmap(null);
+ return newBitmap;
+ }
+}
+
/**
* A {@link com.android.photos.views.TiledImageRenderer.TileSource} using
* {@link BitmapRegionDecoder} to wrap a local file
@@ -53,9 +156,214 @@
private static final int GL_SIZE_LIMIT = 2048;
// This must be no larger than half the size of the GL_SIZE_LIMIT
// due to decodePreview being allowed to be up to 2x the size of the target
- private static final int MAX_PREVIEW_SIZE = 1024;
+ public static final int MAX_PREVIEW_SIZE = GL_SIZE_LIMIT / 2;
- BitmapRegionDecoder mDecoder;
+ public static abstract class BitmapSource {
+ private SimpleBitmapRegionDecoder mDecoder;
+ private Bitmap mPreview;
+ private int mPreviewSize;
+ private int mRotation;
+ public enum State { NOT_LOADED, LOADED, ERROR_LOADING };
+ private State mState = State.NOT_LOADED;
+ public BitmapSource(int previewSize) {
+ mPreviewSize = previewSize;
+ }
+ public boolean loadInBackground() {
+ ExifInterface ei = new ExifInterface();
+ if (readExif(ei)) {
+ Integer ori = ei.getTagIntValue(ExifInterface.TAG_ORIENTATION);
+ if (ori != null) {
+ mRotation = ExifInterface.getRotationForOrientationValue(ori.shortValue());
+ }
+ }
+ mDecoder = loadBitmapRegionDecoder();
+ if (mDecoder == null) {
+ mState = State.ERROR_LOADING;
+ return false;
+ } else {
+ int width = mDecoder.getWidth();
+ int height = mDecoder.getHeight();
+ if (mPreviewSize != 0) {
+ int previewSize = Math.min(mPreviewSize, MAX_PREVIEW_SIZE);
+ BitmapFactory.Options opts = new BitmapFactory.Options();
+ opts.inPreferredConfig = Bitmap.Config.ARGB_8888;
+ opts.inPreferQualityOverSpeed = true;
+
+ float scale = (float) previewSize / Math.max(width, height);
+ opts.inSampleSize = BitmapUtils.computeSampleSizeLarger(scale);
+ opts.inJustDecodeBounds = false;
+ mPreview = loadPreviewBitmap(opts);
+ }
+ mState = State.LOADED;
+ return true;
+ }
+ }
+
+ public State getLoadingState() {
+ return mState;
+ }
+
+ public SimpleBitmapRegionDecoder getBitmapRegionDecoder() {
+ return mDecoder;
+ }
+
+ public Bitmap getPreviewBitmap() {
+ return mPreview;
+ }
+
+ public int getPreviewSize() {
+ return mPreviewSize;
+ }
+
+ public int getRotation() {
+ return mRotation;
+ }
+
+ public abstract boolean readExif(ExifInterface ei);
+ public abstract SimpleBitmapRegionDecoder loadBitmapRegionDecoder();
+ public abstract Bitmap loadPreviewBitmap(BitmapFactory.Options options);
+ }
+
+ public static class FilePathBitmapSource extends BitmapSource {
+ private String mPath;
+ public FilePathBitmapSource(String path, int previewSize) {
+ super(previewSize);
+ mPath = path;
+ }
+ @Override
+ public SimpleBitmapRegionDecoder loadBitmapRegionDecoder() {
+ SimpleBitmapRegionDecoder d;
+ d = SimpleBitmapRegionDecoderWrapper.newInstance(mPath, true);
+ if (d == null) {
+ d = DumbBitmapRegionDecoder.newInstance(mPath);
+ }
+ return d;
+ }
+ @Override
+ public Bitmap loadPreviewBitmap(BitmapFactory.Options options) {
+ return BitmapFactory.decodeFile(mPath, options);
+ }
+ @Override
+ public boolean readExif(ExifInterface ei) {
+ try {
+ ei.readExif(mPath);
+ return true;
+ } catch (IOException e) {
+ Log.w("BitmapRegionTileSource", "getting decoder failed", e);
+ return false;
+ }
+ }
+ }
+
+ public static class UriBitmapSource extends BitmapSource {
+ private Context mContext;
+ private Uri mUri;
+ public UriBitmapSource(Context context, Uri uri, int previewSize) {
+ super(previewSize);
+ mContext = context;
+ mUri = uri;
+ }
+ private InputStream regenerateInputStream() throws FileNotFoundException {
+ InputStream is = mContext.getContentResolver().openInputStream(mUri);
+ return new BufferedInputStream(is);
+ }
+ @Override
+ public SimpleBitmapRegionDecoder loadBitmapRegionDecoder() {
+ try {
+ InputStream is = regenerateInputStream();
+ SimpleBitmapRegionDecoder regionDecoder =
+ SimpleBitmapRegionDecoderWrapper.newInstance(is, false);
+ Utils.closeSilently(is);
+ if (regionDecoder == null) {
+ is = regenerateInputStream();
+ regionDecoder = DumbBitmapRegionDecoder.newInstance(is);
+ Utils.closeSilently(is);
+ }
+ return regionDecoder;
+ } catch (FileNotFoundException e) {
+ Log.e("BitmapRegionTileSource", "Failed to load URI " + mUri, e);
+ return null;
+ } catch (IOException e) {
+ Log.e("BitmapRegionTileSource", "Failure while reading URI " + mUri, e);
+ return null;
+ }
+ }
+ @Override
+ public Bitmap loadPreviewBitmap(BitmapFactory.Options options) {
+ try {
+ InputStream is = regenerateInputStream();
+ Bitmap b = BitmapFactory.decodeStream(is, null, options);
+ Utils.closeSilently(is);
+ return b;
+ } catch (FileNotFoundException e) {
+ Log.e("BitmapRegionTileSource", "Failed to load URI " + mUri, e);
+ return null;
+ }
+ }
+ @Override
+ public boolean readExif(ExifInterface ei) {
+ InputStream is = null;
+ try {
+ is = regenerateInputStream();
+ ei.readExif(is);
+ Utils.closeSilently(is);
+ return true;
+ } catch (FileNotFoundException e) {
+ Log.e("BitmapRegionTileSource", "Failed to load URI " + mUri, e);
+ return false;
+ } catch (IOException e) {
+ Log.e("BitmapRegionTileSource", "Failed to load URI " + mUri, e);
+ return false;
+ } finally {
+ Utils.closeSilently(is);
+ }
+ }
+ }
+
+ public static class ResourceBitmapSource extends BitmapSource {
+ private Resources mRes;
+ private int mResId;
+ public ResourceBitmapSource(Resources res, int resId, int previewSize) {
+ super(previewSize);
+ mRes = res;
+ mResId = resId;
+ }
+ private InputStream regenerateInputStream() {
+ InputStream is = mRes.openRawResource(mResId);
+ return new BufferedInputStream(is);
+ }
+ @Override
+ public SimpleBitmapRegionDecoder loadBitmapRegionDecoder() {
+ InputStream is = regenerateInputStream();
+ SimpleBitmapRegionDecoder regionDecoder =
+ SimpleBitmapRegionDecoderWrapper.newInstance(is, false);
+ Utils.closeSilently(is);
+ if (regionDecoder == null) {
+ is = regenerateInputStream();
+ regionDecoder = DumbBitmapRegionDecoder.newInstance(is);
+ Utils.closeSilently(is);
+ }
+ return regionDecoder;
+ }
+ @Override
+ public Bitmap loadPreviewBitmap(BitmapFactory.Options options) {
+ return BitmapFactory.decodeResource(mRes, mResId, options);
+ }
+ @Override
+ public boolean readExif(ExifInterface ei) {
+ try {
+ InputStream is = regenerateInputStream();
+ ei.readExif(is);
+ Utils.closeSilently(is);
+ return true;
+ } catch (IOException e) {
+ Log.e("BitmapRegionTileSource", "Error reading resource", e);
+ return false;
+ }
+ }
+ }
+
+ SimpleBitmapRegionDecoder mDecoder;
int mWidth;
int mHeight;
int mTileSize;
@@ -68,58 +376,33 @@
private BitmapFactory.Options mOptions;
private Canvas mCanvas;
- public BitmapRegionTileSource(Context context, String path, int previewSize, int rotation) {
- this(null, context, path, null, 0, previewSize, rotation);
- }
-
- public BitmapRegionTileSource(Context context, Uri uri, int previewSize, int rotation) {
- this(null, context, null, uri, 0, previewSize, rotation);
- }
-
- public BitmapRegionTileSource(Resources res,
- Context context, int resId, int previewSize, int rotation) {
- this(res, context, null, null, resId, previewSize, rotation);
- }
-
- private BitmapRegionTileSource(Resources res,
- Context context, String path, Uri uri, int resId, int previewSize, int rotation) {
+ public BitmapRegionTileSource(Context context, BitmapSource source) {
mTileSize = TiledImageRenderer.suggestedTileSize(context);
- mRotation = rotation;
- try {
- if (path != null) {
- mDecoder = BitmapRegionDecoder.newInstance(path, true);
- } else if (uri != null) {
- InputStream is = context.getContentResolver().openInputStream(uri);
- BufferedInputStream bis = new BufferedInputStream(is);
- mDecoder = BitmapRegionDecoder.newInstance(bis, true);
- } else {
- InputStream is = res.openRawResource(resId);
- BufferedInputStream bis = new BufferedInputStream(is);
- mDecoder = BitmapRegionDecoder.newInstance(bis, true);
- }
+ mRotation = source.getRotation();
+ mDecoder = source.getBitmapRegionDecoder();
+ if (mDecoder != null) {
mWidth = mDecoder.getWidth();
mHeight = mDecoder.getHeight();
- } catch (IOException e) {
- Log.w("BitmapRegionTileSource", "ctor failed", e);
- }
- mOptions = new BitmapFactory.Options();
- mOptions.inPreferredConfig = Bitmap.Config.ARGB_8888;
- mOptions.inPreferQualityOverSpeed = true;
- mOptions.inTempStorage = new byte[16 * 1024];
- if (previewSize != 0) {
- previewSize = Math.min(previewSize, MAX_PREVIEW_SIZE);
- // Although this is the same size as the Bitmap that is likely already
- // loaded, the lifecycle is different and interactions are on a different
- // thread. Thus to simplify, this source will decode its own bitmap.
- Bitmap preview = decodePreview(res, context, path, uri, resId, previewSize);
- if (preview.getWidth() <= GL_SIZE_LIMIT && preview.getHeight() <= GL_SIZE_LIMIT) {
- mPreview = new BitmapTexture(preview);
- } else {
- Log.w(TAG, String.format(
- "Failed to create preview of apropriate size! "
- + " in: %dx%d, out: %dx%d",
- mWidth, mHeight,
- preview.getWidth(), preview.getHeight()));
+ mOptions = new BitmapFactory.Options();
+ mOptions.inPreferredConfig = Bitmap.Config.ARGB_8888;
+ mOptions.inPreferQualityOverSpeed = true;
+ mOptions.inTempStorage = new byte[16 * 1024];
+ int previewSize = source.getPreviewSize();
+ if (previewSize != 0) {
+ previewSize = Math.min(previewSize, MAX_PREVIEW_SIZE);
+ // Although this is the same size as the Bitmap that is likely already
+ // loaded, the lifecycle is different and interactions are on a different
+ // thread. Thus to simplify, this source will decode its own bitmap.
+ Bitmap preview = decodePreview(source, previewSize);
+ if (preview.getWidth() <= GL_SIZE_LIMIT && preview.getHeight() <= GL_SIZE_LIMIT) {
+ mPreview = new BitmapTexture(preview);
+ } else {
+ Log.w(TAG, String.format(
+ "Failed to create preview of apropriate size! "
+ + " in: %dx%d, out: %dx%d",
+ mWidth, mHeight,
+ preview.getWidth(), preview.getHeight()));
+ }
}
}
}
@@ -215,33 +498,15 @@
* Note that the returned bitmap may have a long edge that's longer
* than the targetSize, but it will always be less than 2x the targetSize
*/
- private Bitmap decodePreview(
- Resources res, Context context, String file, Uri uri, int resId, int targetSize) {
- float scale = (float) targetSize / Math.max(mWidth, mHeight);
- mOptions.inSampleSize = BitmapUtils.computeSampleSizeLarger(scale);
- mOptions.inJustDecodeBounds = false;
-
- Bitmap result = null;
- if (file != null) {
- result = BitmapFactory.decodeFile(file, mOptions);
- } else if (uri != null) {
- try {
- InputStream is = context.getContentResolver().openInputStream(uri);
- BufferedInputStream bis = new BufferedInputStream(is);
- result = BitmapFactory.decodeStream(bis, null, mOptions);
- } catch (IOException e) {
- Log.w("BitmapRegionTileSource", "getting preview failed", e);
- }
- } else {
- result = BitmapFactory.decodeResource(res, resId, mOptions);
- }
+ private Bitmap decodePreview(BitmapSource source, int targetSize) {
+ Bitmap result = source.getPreviewBitmap();
if (result == null) {
return null;
}
// We need to resize down if the decoder does not support inSampleSize
// or didn't support the specified inSampleSize (some decoders only do powers of 2)
- scale = (float) targetSize / (float) (Math.max(result.getWidth(), result.getHeight()));
+ float scale = (float) targetSize / (float) (Math.max(result.getWidth(), result.getHeight()));
if (scale <= 0.5) {
result = BitmapUtils.resizeBitmapByScale(result, scale, true);
diff --git a/update_system_wallpaper_cropper.py b/update_system_wallpaper_cropper.py
new file mode 100644
index 0000000..5d24f6f
--- /dev/null
+++ b/update_system_wallpaper_cropper.py
@@ -0,0 +1,55 @@
+# This script is used to push the most up-to-date files from
+# Launcher into frameworks' version of the WallpaperCropActivity
+# (and supporting files)
+# The framework versions have some small modifications that are
+# necessary so do this with care
+import os
+import sys
+files = """
+src/android/util/Pools.java
+src/com/android/gallery3d/util/IntArray.java
+src/com/android/gallery3d/common/Utils.java
+src/com/android/gallery3d/exif/ByteBufferInputStream.java
+src/com/android/gallery3d/exif/CountedDataInputStream.java
+src/com/android/gallery3d/exif/ExifData.java
+src/com/android/gallery3d/exif/ExifInterface.java
+src/com/android/gallery3d/exif/ExifInvalidFormatException.java
+src/com/android/gallery3d/exif/ExifModifier.java
+src/com/android/gallery3d/exif/ExifOutputStream.java
+src/com/android/gallery3d/exif/ExifParser.java
+src/com/android/gallery3d/exif/ExifReader.java
+src/com/android/gallery3d/exif/ExifTag.java
+src/com/android/gallery3d/exif/IfdData.java
+src/com/android/gallery3d/exif/IfdId.java
+src/com/android/gallery3d/exif/JpegHeader.java
+src/com/android/gallery3d/exif/OrderedDataOutputStream.java
+src/com/android/gallery3d/exif/Rational.java
+src/com/android/gallery3d/glrenderer/BasicTexture.java
+src/com/android/gallery3d/glrenderer/BitmapTexture.java
+src/com/android/gallery3d/glrenderer/GLCanvas.java
+src/com/android/gallery3d/glrenderer/GLES20Canvas.java
+src/com/android/gallery3d/glrenderer/GLES20IdImpl.java
+src/com/android/gallery3d/glrenderer/GLId.java
+src/com/android/gallery3d/glrenderer/GLPaint.java
+src/com/android/gallery3d/glrenderer/RawTexture.java
+src/com/android/gallery3d/glrenderer/Texture.java
+src/com/android/gallery3d/glrenderer/UploadedTexture.java
+src/com/android/photos/BitmapRegionTileSource.java
+src/com/android/photos/views/BlockingGLTextureView.java
+src/com/android/photos/views/TiledImageRenderer.java
+src/com/android/photos/views/TiledImageView.java
+src/com/android/gallery3d/common/BitmapUtils.java
+src/com/android/launcher3/CropView.java
+src/com/android/launcher3/WallpaperCropActivity.java
+"""
+
+if len(sys.argv) != 2:
+ print "Usage: python update_sytem_wallpaper_cropper.py <framework_dir>"
+ exit()
+framework_dir = sys.argv[1] + "/packages/WallpaperCropper"
+for file_path in files.split():
+ dir = os.path.dirname(file_path)
+ dir = dir.replace("launcher3", "wallpapercropper")
+ cmd = 'cp %s %s/%s' % (file_path, framework_dir, dir)
+ print cmd
+ os.system(cmd)