summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMichael Jurka <mikejurka@google.com>2010-08-04 16:43:30 -0700
committerMichael Jurka <mikejurka@google.com>2010-08-04 17:32:13 -0700
commit8335a24a6b7ae061e1f141dfa5ae20df64deb7cb (patch)
tree681823f6ba008fcc596da418eb1a3764408aa006 /src
parentf6710fa8af3f1d0d6ca2f9f51969dc9080bd2b32 (diff)
downloadandroid_packages_apps_Trebuchet-8335a24a6b7ae061e1f141dfa5ae20df64deb7cb.tar.gz
android_packages_apps_Trebuchet-8335a24a6b7ae061e1f141dfa5ae20df64deb7cb.tar.bz2
android_packages_apps_Trebuchet-8335a24a6b7ae061e1f141dfa5ae20df64deb7cb.zip
updated Launcher2 based on recent changes to view properties
- fixes bugs on both N1 and stingray where workspace was seemingly disappearing Change-Id: Ica3c5aad7bbce58c35417a0022bfe0d1328c2322
Diffstat (limited to 'src')
-rw-r--r--src/com/android/launcher2/Workspace.java16
1 files changed, 6 insertions, 10 deletions
diff --git a/src/com/android/launcher2/Workspace.java b/src/com/android/launcher2/Workspace.java
index 6d94eaa9c..15b12b7d8 100644
--- a/src/com/android/launcher2/Workspace.java
+++ b/src/com/android/launcher2/Workspace.java
@@ -634,22 +634,18 @@ public class Workspace extends ViewGroup
@Override
protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
- final int screenCount = getChildCount();
if (mFirstLayout) {
- final int width = getWidth();
- for (int i = 0; i < screenCount; i++) {
- getChildAt(i).setX(i*width);
- }
mFirstLayout = false;
}
-
+ int childLeft = 0;
+ final int screenCount = getChildCount();
for (int i = 0; i < screenCount; i++) {
final View child = getChildAt(i);
if (child.getVisibility() != View.GONE) {
- final int childX = (int)child.getX();
- final int childY = (int)child.getY();
- child.layout(childX, childY,
- childX + child.getMeasuredWidth(), childY + child.getMeasuredHeight());
+ final int childWidth = child.getMeasuredWidth();
+ child.layout(childLeft, 0,
+ childLeft + childWidth, child.getMeasuredHeight());
+ childLeft += childWidth;
}
}