summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWinson Chung <winsonc@google.com>2011-08-03 14:48:25 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-08-03 14:48:25 -0700
commit459814b7e6d6c9bb6b0569dcedb455f6fab3aa9c (patch)
treeaa2e652ae8388b425107a49673d90da41609682a
parent7578ec6fa9a747210aba484d226b5f97773752e3 (diff)
parent54c725cc294cd43ed0650179bfae64a622547660 (diff)
downloadandroid_packages_apps_Trebuchet-459814b7e6d6c9bb6b0569dcedb455f6fab3aa9c.tar.gz
android_packages_apps_Trebuchet-459814b7e6d6c9bb6b0569dcedb455f6fab3aa9c.tar.bz2
android_packages_apps_Trebuchet-459814b7e6d6c9bb6b0569dcedb455f6fab3aa9c.zip
Merge "Bug fixes"
-rw-r--r--res/layout-land/search_bar.xml4
-rw-r--r--res/layout-large/search_bar.xml4
-rw-r--r--res/layout-port/search_bar.xml4
-rw-r--r--res/values-large/styles.xml2
-rw-r--r--res/values/styles.xml2
-rw-r--r--src/com/android/launcher2/AppsCustomizePagedView.java10
-rw-r--r--src/com/android/launcher2/CellLayout.java4
7 files changed, 18 insertions, 12 deletions
diff --git a/res/layout-land/search_bar.xml b/res/layout-land/search_bar.xml
index 0dbfd7b35..452a80c22 100644
--- a/res/layout-land/search_bar.xml
+++ b/res/layout-land/search_bar.xml
@@ -27,7 +27,7 @@
android:layout_height="wrap_content"
android:src="@drawable/ic_search_normal_holo"
android:adjustViewBounds="true"
- android:background="@drawable/button_bg"
+ android:background="?android:attr/selectableItemBackground"
android:onClick="onClickSearchButton"
android:focusable="true"
android:clickable="true"
@@ -49,7 +49,7 @@
android:layout_height="wrap_content"
android:src="@drawable/ic_voice_search_holo"
android:adjustViewBounds="true"
- android:background="@drawable/button_bg"
+ android:background="?android:attr/selectableItemBackground"
android:onClick="onClickVoiceButton"
android:focusable="true"
android:clickable="true"
diff --git a/res/layout-large/search_bar.xml b/res/layout-large/search_bar.xml
index e26a96a48..d6482feb5 100644
--- a/res/layout-large/search_bar.xml
+++ b/res/layout-large/search_bar.xml
@@ -28,7 +28,7 @@
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:src="@drawable/ic_search_normal_holo"
- android:background="@drawable/button_bg"
+ android:background="?android:attr/selectableItemBackground"
android:onClick="onClickSearchButton"
android:focusable="true"
android:clickable="true"
@@ -51,7 +51,7 @@
android:layout_height="wrap_content"
android:layout_toRightOf="@+id/search_divider"
android:src="@drawable/ic_voice_search_holo"
- android:background="@drawable/button_bg"
+ android:background="?android:attr/selectableItemBackground"
android:onClick="onClickVoiceButton"
android:focusable="true"
android:clickable="true"
diff --git a/res/layout-port/search_bar.xml b/res/layout-port/search_bar.xml
index 0de290a04..b65da0b65 100644
--- a/res/layout-port/search_bar.xml
+++ b/res/layout-port/search_bar.xml
@@ -27,7 +27,7 @@
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:layout_toLeftOf="@+id/voice_button"
- android:background="@drawable/button_bg"
+ android:background="?android:attr/selectableItemBackground"
android:onClick="onClickSearchButton"
android:focusable="true"
android:clickable="true"
@@ -50,7 +50,7 @@
android:layout_alignParentTop="true"
android:src="@drawable/ic_voice_search_holo"
android:adjustViewBounds="true"
- android:background="@drawable/button_bg"
+ android:background="?android:attr/selectableItemBackground"
android:onClick="onClickVoiceButton"
android:focusable="true"
android:clickable="true"
diff --git a/res/values-large/styles.xml b/res/values-large/styles.xml
index ea1a8e635..41bd9cd22 100644
--- a/res/values-large/styles.xml
+++ b/res/values-large/styles.xml
@@ -94,7 +94,7 @@
</style>
<style name="DropTargetButton">
<item name="android:layout_width">wrap_content</item>
- <item name="android:layout_height">wrap_content</item>
+ <item name="android:layout_height">match_parent</item>
<item name="android:layout_gravity">center</item>
<item name="android:gravity">center_vertical</item>
<item name="android:drawablePadding">7.5dp</item>
diff --git a/res/values/styles.xml b/res/values/styles.xml
index b356a424b..15ca427a7 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -104,7 +104,7 @@
</style>
<style name="DropTargetButton">
<item name="android:layout_width">wrap_content</item>
- <item name="android:layout_height">wrap_content</item>
+ <item name="android:layout_height">match_parent</item>
<item name="android:layout_gravity">center</item>
<item name="android:gravity">center_vertical</item>
<item name="android:drawablePadding">7.5dp</item>
diff --git a/src/com/android/launcher2/AppsCustomizePagedView.java b/src/com/android/launcher2/AppsCustomizePagedView.java
index e5fe7bd26..53d154ff0 100644
--- a/src/com/android/launcher2/AppsCustomizePagedView.java
+++ b/src/com/android/launcher2/AppsCustomizePagedView.java
@@ -228,6 +228,7 @@ public class AppsCustomizePagedView extends PagedViewWithDraggableItems implemen
// (top + bottom)
mWidgetPreviewIconPaddedDimension =
(int) (mAppIconSize * (1 + (2 * sWidgetPreviewIconPaddingPercentage)));
+ mFadeInAdjacentScreens = LauncherApplication.isScreenLarge();
}
@Override
@@ -567,7 +568,9 @@ public class AppsCustomizePagedView extends PagedViewWithDraggableItems implemen
layout.allowHardwareLayerCreation();
layout.createHardwareLayers();
- prepareGenerateHoloOutlinesTask(page, items, images);
+ if (mFadeInAdjacentScreens) {
+ prepareGenerateHoloOutlinesTask(page, items, images);
+ }
}
/**
@@ -929,7 +932,10 @@ public class AppsCustomizePagedView extends PagedViewWithDraggableItems implemen
invalidate();
forceUpdateAdjacentPagesAlpha();
- prepareGenerateHoloOutlinesTask(data.page, data.items, data.generatedImages);
+
+ if (mFadeInAdjacentScreens) {
+ prepareGenerateHoloOutlinesTask(data.page, data.items, data.generatedImages);
+ }
}
private void onHolographicPageItemsLoaded(AsyncTaskPageData data) {
// Invalidate early to short-circuit children invalidates
diff --git a/src/com/android/launcher2/CellLayout.java b/src/com/android/launcher2/CellLayout.java
index 0a3c96dc4..d9d048788 100644
--- a/src/com/android/launcher2/CellLayout.java
+++ b/src/com/android/launcher2/CellLayout.java
@@ -1528,8 +1528,8 @@ public class CellLayout extends ViewGroup {
int smallerSize = Math.min(actualWidth, actualHeight);
// Always round up to next largest cell
- int spanX = (width + smallerSize) / smallerSize;
- int spanY = (height + smallerSize) / smallerSize;
+ int spanX = (int) Math.ceil(width / (float) smallerSize);
+ int spanY = (int) Math.ceil(height / (float) smallerSize);
if (result == null) {
return new int[] { spanX, spanY };