summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/dragndrop
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/launcher3/dragndrop')
-rw-r--r--src/com/android/launcher3/dragndrop/DragLayer.java11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/com/android/launcher3/dragndrop/DragLayer.java b/src/com/android/launcher3/dragndrop/DragLayer.java
index ef9c9652d..1bbbd4615 100644
--- a/src/com/android/launcher3/dragndrop/DragLayer.java
+++ b/src/com/android/launcher3/dragndrop/DragLayer.java
@@ -38,6 +38,7 @@ import android.os.Build;
import android.util.AttributeSet;
import android.view.DragEvent;
import android.view.KeyEvent;
+import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
@@ -621,12 +622,12 @@ public class DragLayer extends InsettableFrameLayout {
public void addResizeFrame(LauncherAppWidgetHostView widget, CellLayout cellLayout) {
clearResizeFrame();
- mCurrentResizeFrame = new AppWidgetResizeFrame(getContext(), widget, cellLayout, this);
+ mCurrentResizeFrame = (AppWidgetResizeFrame) LayoutInflater.from(mLauncher)
+ .inflate(R.layout.app_widget_resize_frame, this, false);
+ mCurrentResizeFrame.setupForWidget(widget, cellLayout, this);
+ ((LayoutParams) mCurrentResizeFrame.getLayoutParams()).customPosition = true;
- LayoutParams lp = new LayoutParams(-1, -1);
- lp.customPosition = true;
-
- addView(mCurrentResizeFrame, lp);
+ addView(mCurrentResizeFrame);
mCurrentResizeFrame.snapToWidget(false);
}