summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorWinson Chung <winsonc@google.com>2011-07-29 13:56:44 -0700
committerWinson Chung <winsonc@google.com>2011-07-29 13:57:15 -0700
commit72d8b393b03f9decba05b0797608ccdc751fecef (patch)
tree9f9a99cefed20be3f17ca03199a7d52453558456 /src
parentfec9786f2e7171f6616b8258a8dee8be2d5f1fd4 (diff)
downloadandroid_packages_apps_Trebuchet-72d8b393b03f9decba05b0797608ccdc751fecef.tar.gz
android_packages_apps_Trebuchet-72d8b393b03f9decba05b0797608ccdc751fecef.tar.bz2
android_packages_apps_Trebuchet-72d8b393b03f9decba05b0797608ccdc751fecef.zip
Removing use of deprecated constants in GridLayout.
Change-Id: Ifbf88e182cab5f68276e4d69f866238c91591c0b
Diffstat (limited to 'src')
-rw-r--r--src/com/android/launcher2/AppsCustomizePagedView.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/com/android/launcher2/AppsCustomizePagedView.java b/src/com/android/launcher2/AppsCustomizePagedView.java
index d07b321df..cb60034ac 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);