Cleaning up folder layout, still pending final assets / cell size
-> see bug 5044356
Change-Id: I80a3cd90145de2a774565aae04809d8c1d04ccd5
diff --git a/src/com/android/launcher2/Folder.java b/src/com/android/launcher2/Folder.java
index d3b5d41..428d7b3 100644
--- a/src/com/android/launcher2/Folder.java
+++ b/src/com/android/launcher2/Folder.java
@@ -35,12 +35,10 @@
import android.view.MenuItem;
import android.view.MotionEvent;
import android.view.View;
-import android.view.View.MeasureSpec;
import android.view.animation.AccelerateInterpolator;
import android.view.animation.DecelerateInterpolator;
import android.view.inputmethod.EditorInfo;
import android.view.inputmethod.InputMethodManager;
-import android.widget.AdapterView;
import android.widget.LinearLayout;
import android.widget.TextView;
@@ -717,9 +715,8 @@
DragLayer.LayoutParams lp = (DragLayer.LayoutParams) getLayoutParams();
int width = getPaddingLeft() + getPaddingRight() + mContent.getDesiredWidth();
- // Technically there is no padding at the bottom, but we add space equal to the padding
- // and have to account for that here.
- int height = getPaddingTop() + mContent.getDesiredHeight() + mFolderNameHeight;
+ int height = getPaddingTop() + getPaddingBottom() + mContent.getDesiredHeight()
+ + mFolderNameHeight;
DragLayer parent = (DragLayer) mLauncher.findViewById(R.id.drag_layer);
parent.getDescendantRectRelativeToSelf(mFolderIcon, mTempRect);
@@ -783,9 +780,8 @@
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
int width = getPaddingLeft() + getPaddingRight() + mContent.getDesiredWidth();
- // Technically there is no padding at the bottom, but we add space equal to the padding
- // and have to account for that here.
- int height = getPaddingTop() + mContent.getDesiredHeight() + mFolderNameHeight;
+ int height = getPaddingTop() + getPaddingBottom() + mContent.getDesiredHeight()
+ + mFolderNameHeight;
int contentWidthSpec = MeasureSpec.makeMeasureSpec(mContent.getDesiredWidth(),
MeasureSpec.EXACTLY);