diff options
-rw-r--r-- | res/layout/user_folder.xml | 13 | ||||
-rw-r--r-- | res/values/dimens.xml | 5 | ||||
-rw-r--r-- | src/com/android/launcher2/Folder.java | 12 |
3 files changed, 11 insertions, 19 deletions
diff --git a/res/layout/user_folder.xml b/res/layout/user_folder.xml index 548a39e..6b19603 100644 --- a/res/layout/user_folder.xml +++ b/res/layout/user_folder.xml @@ -19,10 +19,6 @@ xmlns:launcher="http://schemas.android.com/apk/res/com.android.launcher" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:paddingLeft="@dimen/folder_padding" - android:paddingRight="@dimen/folder_padding" - android:paddingTop="@dimen/folder_padding" - android:paddingBottom="0dp" android:orientation="vertical" android:background="@drawable/portal_container_holo"> @@ -32,14 +28,14 @@ android:layout_height="wrap_content" android:paddingLeft="0dip" android:paddingRight="0dip" - android:paddingTop="8dip" - android:paddingBottom="8dip" + android:paddingTop="0dip" + android:paddingBottom="0dip" android:cacheColorHint="#ff333333" android:hapticFeedbackEnabled="false" launcher:widthGap="@dimen/folder_width_gap" launcher:heightGap="@dimen/folder_height_gap" - launcher:cellWidth="@dimen/workspace_cell_width" - launcher:cellHeight="@dimen/workspace_cell_height" /> + launcher:cellWidth="@dimen/folder_cell_width" + launcher:cellHeight="@dimen/folder_cell_height" /> <EditText android:id="@+id/folder_name" @@ -47,7 +43,6 @@ android:layout_height="wrap_content" android:layout_centerHorizontal="true" android:paddingTop="@dimen/folder_content_name_gap" - android:paddingBottom="@dimen/folder_padding" android:background="#00000000" android:hint="@string/folder_hint_text" android:textSize="16sp" diff --git a/res/values/dimens.xml b/res/values/dimens.xml index 75786eb..44da352 100644 --- a/res/values/dimens.xml +++ b/res/values/dimens.xml @@ -22,6 +22,8 @@ <dimen name="workspace_width_gap">-1dp</dimen> <dimen name="workspace_height_gap">-1dp</dimen> <dimen name="workspace_max_gap">8dp</dimen> + <dimen name="folder_cell_width">74dp</dimen> + <dimen name="folder_cell_height">80dp</dimen> <dimen name="scroll_track_padding_left">12dp</dimen> <dimen name="scroll_track_padding_right">12dp</dimen> @@ -84,8 +86,7 @@ <dimen name="folder_preview_size">64dp</dimen> <!-- The amount that the preview contents are inset from the preview background --> <dimen name="folder_preview_padding">4dp</dimen> - <dimen name="folder_padding">18dp</dimen> - <dimen name="folder_content_name_gap">10dp</dimen> + <dimen name="folder_content_name_gap">8dp</dimen> <dimen name="folder_width_gap">0dp</dimen> <dimen name="folder_height_gap">0dp</dimen> </resources> 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.Menu; 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 @@ public class Folder extends LinearLayout implements DragSource, View.OnClickList 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 @@ public class Folder extends LinearLayout implements DragSource, View.OnClickList 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); |