From 72d8b393b03f9decba05b0797608ccdc751fecef Mon Sep 17 00:00:00 2001 From: Winson Chung Date: Fri, 29 Jul 2011 13:56:44 -0700 Subject: [PATCH] Removing use of deprecated constants in GridLayout. Change-Id: Ifbf88e182cab5f68276e4d69f866238c91591c0b --- src/com/android/launcher2/AppsCustomizePagedView.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/com/android/launcher2/AppsCustomizePagedView.java b/src/com/android/launcher2/AppsCustomizePagedView.java index d07b321df6..cb60034ac7 100644 --- a/src/com/android/launcher2/AppsCustomizePagedView.java +++ b/src/com/android/launcher2/AppsCustomizePagedView.java @@ -39,6 +39,7 @@ import android.os.AsyncTask; import android.os.Process; import android.util.AttributeSet; import android.util.Log; +import android.view.Gravity; import android.view.LayoutInflater; import android.view.MotionEvent; import android.view.View; @@ -943,10 +944,11 @@ public class AppsCustomizePagedView extends PagedViewWithDraggableItems implemen int ix = i % cellCountX; int iy = i / cellCountX; GridLayout.LayoutParams lp = new GridLayout.LayoutParams( - GridLayout.spec(iy, GridLayout.LEFT, GridLayout.CAN_STRETCH), - GridLayout.spec(ix, GridLayout.TOP, GridLayout.CAN_STRETCH)); + GridLayout.spec(iy, GridLayout.LEFT), + GridLayout.spec(ix, GridLayout.TOP)); lp.width = cellWidth; lp.height = cellHeight; + lp.setGravity(Gravity.TOP | Gravity.LEFT); if (ix > 0) lp.leftMargin = mWidgetWidthGap; if (iy > 0) lp.topMargin = mWidgetHeightGap; layout.addView(widget, lp);