summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTyson Miller <tmiller@cyngn.com>2016-01-11 23:40:38 (GMT)
committerTyson Miller <tmiller@cyngn.com>2016-01-11 23:57:20 (GMT)
commiteb5bc4f3dc84497a3d62306a1eb73ba7b87f182d (patch)
treefebf6f1c7dffb898457d84ba21378efe3c626951
parent80d4ff8dcbb28f3880c312568945b55294f25a4b (diff)
downloadandroid_packages_apps_Trebuchet-eb5bc4f3dc84497a3d62306a1eb73ba7b87f182d.zip
android_packages_apps_Trebuchet-eb5bc4f3dc84497a3d62306a1eb73ba7b87f182d.tar.gz
android_packages_apps_Trebuchet-eb5bc4f3dc84497a3d62306a1eb73ba7b87f182d.tar.bz2
Trebuchet: RemoteFolder: fix folder increasing top margin & adjust badge position
Change-Id: Iea364efc9ab96df1f223ae2dcb9c0a64ac175bbf
-rw-r--r--res/layout/user_folder.xml2
-rw-r--r--res/values/dimens.xml1
-rw-r--r--src/com/android/launcher3/Folder.java2
3 files changed, 3 insertions, 2 deletions
diff --git a/res/layout/user_folder.xml b/res/layout/user_folder.xml
index dc597de..a25710e 100644
--- a/res/layout/user_folder.xml
+++ b/res/layout/user_folder.xml
@@ -23,7 +23,7 @@
android:paddingStart="@dimen/folder_preview_padding"
android:paddingEnd="@dimen/folder_preview_padding"
android:paddingBottom="@dimen/folder_preview_padding"
- android:layout_marginBottom="@dimen/folder_margin"
+ android:layout_margin="@dimen/folder_margin"
android:layout_gravity="bottom|center_horizontal"
android:background="@drawable/folder_bg">
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index 7725af0..a100beb 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -110,7 +110,6 @@
<!-- Folder icon dimens -->
<dimen name="folder_icon">64dp</dimen>
<dimen name="folder_icon_app_preview">22dp</dimen>
- <dimen name="folder_icon_overlay_margin">10dp</dimen>
<!-- Sizes for managed profile badges -->
<dimen name="profile_badge_size">24dp</dimen>
diff --git a/src/com/android/launcher3/Folder.java b/src/com/android/launcher3/Folder.java
index dfd4fd3..1cad48d 100644
--- a/src/com/android/launcher3/Folder.java
+++ b/src/com/android/launcher3/Folder.java
@@ -1347,6 +1347,8 @@ public class Folder extends LinearLayout implements DragSource, View.OnClickList
int left = (grid.availableWidthPx - width) / 2;
// Drop the top down a little so it isn't bounded by the page indicators
int top = (int) (bounds.top + (bounds.height() * 1.15) - height);
+ // Make sure the top margin stays consistent
+ lp.topMargin = getResources().getDimensionPixelSize(R.dimen.folder_margin);
if (width >= bounds.width()) {
// If the folder doesn't fit within the bounds, center it about the desired bounds