summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcretin45 <cretin45@gmail.com>2016-02-15 09:20:04 -0800
committerTom Powell <zifnab@zifnab06.net>2017-03-26 16:17:14 -0700
commit5aea909a1c063c6cf1509200e76d068dfdccb132 (patch)
tree34526f75bbf8f3e50b5acfa6445a9d4ffec12d90
parentc7f9f17ed0e90b6037b6ffb8a4ef0a4438914005 (diff)
downloadandroid_packages_apps_Trebuchet-5aea909a1c063c6cf1509200e76d068dfdccb132.zip
android_packages_apps_Trebuchet-5aea909a1c063c6cf1509200e76d068dfdccb132.tar.gz
android_packages_apps_Trebuchet-5aea909a1c063c6cf1509200e76d068dfdccb132.tar.bz2
Trebuchet: Fix measuring error when reloading app drawer
Issue-id: CYNGNOS-1883 Change-Id: I77705be7020120bc58a45f507b288838a5eba2bb
-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 00a2717..568d6eb 100644
--- a/src/com/android/launcher3/Launcher.java
+++ b/src/com/android/launcher3/Launcher.java
@@ -1862,7 +1862,7 @@ public class Launcher extends Activity
setupSearchBar(this);
mAppsView.addApps(addedApps);
tryAndUpdatePredictedApps();
- mAppsView.reset();
+ mAppsView.onReloadAppDrawer();
}
public void reloadWidgetView() {
diff --git a/src/com/android/launcher3/allapps/AllAppsContainerView.java b/src/com/android/launcher3/allapps/AllAppsContainerView.java
index 0e3cba8..298ede0 100644
--- a/src/com/android/launcher3/allapps/AllAppsContainerView.java
+++ b/src/com/android/launcher3/allapps/AllAppsContainerView.java
@@ -170,6 +170,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) {
@@ -229,11 +231,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();
}
/**
@@ -429,6 +433,10 @@ public class AllAppsContainerView extends BaseContainerView implements DragSourc
}
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
+ if (mReloadDrawer) {
+ updateBackgroundAndPaddings(true);
+ mReloadDrawer = false;
+ }
}
/**