am 2c4d2ccd: Merge "Don’t create dummy app info." into ub-launcher3-burnaby-polish

* commit '2c4d2ccd90e60541efffb980b70270d0bfe4e585':
  Don’t create dummy app info.
This commit is contained in:
Winson Chung
2015-09-30 23:04:10 +00:00
committed by Android Git Automerger
3 changed files with 21 additions and 18 deletions

View File

@@ -336,15 +336,18 @@ public class AllAppsContainerView extends BaseContainerView implements DragSourc
// Precalculate the prediction icon and normal icon sizes
LayoutInflater layoutInflater = LayoutInflater.from(getContext());
BubbleTextView icon = (BubbleTextView) layoutInflater.inflate(R.layout.all_apps_icon, this, false);
icon.applyFromApplicationInfo(mLauncher.createDummyAppInfo());
BubbleTextView icon = (BubbleTextView) layoutInflater.inflate(
R.layout.all_apps_icon, this, false);
icon.applyDummyInfo();
icon.measure(MeasureSpec.makeMeasureSpec(Integer.MAX_VALUE, MeasureSpec.AT_MOST),
MeasureSpec.makeMeasureSpec(Integer.MAX_VALUE, MeasureSpec.AT_MOST));
BubbleTextView predIcon = (BubbleTextView) layoutInflater.inflate(R.layout.all_apps_prediction_bar_icon, this, false);
predIcon.applyFromApplicationInfo(mLauncher.createDummyAppInfo());
BubbleTextView predIcon = (BubbleTextView) layoutInflater.inflate(
R.layout.all_apps_prediction_bar_icon, this, false);
predIcon.applyDummyInfo();
predIcon.measure(MeasureSpec.makeMeasureSpec(Integer.MAX_VALUE, MeasureSpec.AT_MOST),
MeasureSpec.makeMeasureSpec(Integer.MAX_VALUE, MeasureSpec.AT_MOST));
mAppsRecyclerView.setPremeasuredIconHeights(predIcon.getMeasuredHeight(), icon.getMeasuredHeight());
mAppsRecyclerView.setPremeasuredIconHeights(predIcon.getMeasuredHeight(),
icon.getMeasuredHeight());
updateBackgroundAndPaddings();
}