summaryrefslogtreecommitdiffstats
path: root/src/com
diff options
context:
space:
mode:
authorcretin45 <cretin45@gmail.com>2016-02-15 09:20:04 -0800
committercretin45 <cretin45@gmail.com>2016-02-15 09:22:41 -0800
commit577d34207e3d9fcd676d093019bd85da631cef8b (patch)
treea003c048b5578ac1c7609b4e2c4890c803852cc3 /src/com
parent84fb9c9e1d1115331750dc5e5d35b93b42d092c2 (diff)
downloadandroid_packages_apps_Trebuchet-577d34207e3d9fcd676d093019bd85da631cef8b.zip
android_packages_apps_Trebuchet-577d34207e3d9fcd676d093019bd85da631cef8b.tar.gz
android_packages_apps_Trebuchet-577d34207e3d9fcd676d093019bd85da631cef8b.tar.bz2
Trebuchet: Fix measuring error when reloading app drawer
Issue-id: CYNGNOS-1883 Change-Id: I77705be7020120bc58a45f507b288838a5eba2bb
Diffstat (limited to 'src/com')
-rw-r--r--src/com/android/launcher3/Launcher.java2
-rw-r--r--src/com/android/launcher3/allapps/AllAppsContainerView.java12
2 files changed, 11 insertions, 3 deletions
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java
index eaf5687..64e8579 100644
--- a/src/com/android/launcher3/Launcher.java
+++ b/src/com/android/launcher3/Launcher.java
@@ -1885,7 +1885,7 @@ public class Launcher extends Activity
setupSearchBar(this);
mAppsView.addApps(addedApps);
tryAndUpdatePredictedApps();
- mAppsView.reset();
+ mAppsView.onReloadAppDrawer();
sRemoteFolderManager.onReloadAppDrawer();
}
diff --git a/src/com/android/launcher3/allapps/AllAppsContainerView.java b/src/com/android/launcher3/allapps/AllAppsContainerView.java
index f9690f5..8e44911 100644
--- a/src/com/android/launcher3/allapps/AllAppsContainerView.java
+++ b/src/com/android/launcher3/allapps/AllAppsContainerView.java
@@ -98,6 +98,8 @@ public class AllAppsContainerView extends BaseContainerView implements DragSourc
// This coordinate is relative to its parent
private final Point mIconLastTouchPos = new Point();
+ private boolean mReloadDrawer = false;
+
private View.OnClickListener mSearchClickListener = new View.OnClickListener() {
@Override
public void onClick(View v) {
@@ -178,11 +180,13 @@ public class AllAppsContainerView extends BaseContainerView implements DragSourc
}
/**
- * Resets the existing apps in the list
+ * Reloads the existing apps in the list
*/
- public void reset() {
+ public void onReloadAppDrawer() {
+ mReloadDrawer = true;
List<AppInfo> apps = mApps.getApps();
updateApps(apps);
+ requestLayout();
}
/**
@@ -378,6 +382,10 @@ public class AllAppsContainerView extends BaseContainerView implements DragSourc
}
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
+ if (mReloadDrawer) {
+ updateBackgroundAndPaddings(true);
+ mReloadDrawer = false;
+ }
}
/**