diff options
author | Winson Chung <winsonc@google.com> | 2011-08-03 12:03:40 -0700 |
---|---|---|
committer | Winson Chung <winsonc@google.com> | 2011-08-03 14:29:19 -0700 |
commit | 54c725cc294cd43ed0650179bfae64a622547660 (patch) | |
tree | d90016ff4cdbfaba7ab16d77b1039ae364d7e3db | |
parent | aaf473c2bb6329b3b09ed2e19de6aae26077050c (diff) | |
download | packages_apps_trebuchet-54c725cc294cd43ed0650179bfae64a622547660.zip packages_apps_trebuchet-54c725cc294cd43ed0650179bfae64a622547660.tar.gz packages_apps_trebuchet-54c725cc294cd43ed0650179bfae64a622547660.tar.bz2 |
Bug fixes
- Fixing issue where drop target is not as tall as it should be (5116098)
- Fixing issue where number of cells was being computed incorrectly (5112002)
- Disabling side page fading in AppsCustomize on the phone UI
- Should be using action bar bg states instead of tab bg states (5086625)
Change-Id: I0ec927f87cede48dcf4b66cbaa1d62a09f3492b8
-rw-r--r-- | res/layout-land/search_bar.xml | 4 | ||||
-rw-r--r-- | res/layout-large/search_bar.xml | 4 | ||||
-rw-r--r-- | res/layout-port/search_bar.xml | 4 | ||||
-rw-r--r-- | res/values-large/styles.xml | 2 | ||||
-rw-r--r-- | res/values/styles.xml | 2 | ||||
-rw-r--r-- | src/com/android/launcher2/AppsCustomizePagedView.java | 10 | ||||
-rw-r--r-- | src/com/android/launcher2/CellLayout.java | 4 |
7 files changed, 18 insertions, 12 deletions
diff --git a/res/layout-land/search_bar.xml b/res/layout-land/search_bar.xml index 0dbfd7b..452a80c 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 e26a96a..d6482fe 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 0de290a..b65da0b 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 ea1a8e6..41bd9cd 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 b356a42..15ca427 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 e5fe7bd..53d154f 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 0a3c96d..d9d0487 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 }; |