diff options
author | Hyunyoung Song <hyunyoungs@google.com> | 2016-02-23 18:23:54 -0800 |
---|---|---|
committer | Hyunyoung Song <hyunyoungs@google.com> | 2016-02-23 18:23:54 -0800 |
commit | b7271fd17ea78acbf8506b2c9a34f741680fc4a9 (patch) | |
tree | fe9fd6e30aea4909e88f26ca090d18e17708ce93 /src/com/android/launcher3/widget | |
parent | e1bd986d77afc9426e320b7cce53993086f9d8ba (diff) | |
download | android_packages_apps_Trebuchet-b7271fd17ea78acbf8506b2c9a34f741680fc4a9.tar.gz android_packages_apps_Trebuchet-b7271fd17ea78acbf8506b2c9a34f741680fc4a9.tar.bz2 android_packages_apps_Trebuchet-b7271fd17ea78acbf8506b2c9a34f741680fc4a9.zip |
Change preloading coefficient for widgets tray to improve jankness
on low performance devices.
Change-Id: I6dfe1161bf596792a7fc8b3c5160a4922e177834
Diffstat (limited to 'src/com/android/launcher3/widget')
-rw-r--r-- | src/com/android/launcher3/widget/WidgetsContainerView.java | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/src/com/android/launcher3/widget/WidgetsContainerView.java b/src/com/android/launcher3/widget/WidgetsContainerView.java index 0173eb771..03410ed4a 100644 --- a/src/com/android/launcher3/widget/WidgetsContainerView.java +++ b/src/com/android/launcher3/widget/WidgetsContainerView.java @@ -55,9 +55,6 @@ public class WidgetsContainerView extends BaseContainerView private static final String TAG = "WidgetsContainerView"; private static final boolean LOGD = false; - /* Coefficient multiplied to the screen height for preloading widgets. */ - private static final int PRELOAD_SCREEN_HEIGHT_MULTIPLE = 1; - /* Global instances that are used inside this container. */ @Thunk Launcher mLauncher; private DragController mDragController; @@ -97,16 +94,7 @@ public class WidgetsContainerView extends BaseContainerView super.onFinishInflate(); mRecyclerView = (WidgetsRecyclerView) getContentView().findViewById(R.id.widgets_list_view); mRecyclerView.setAdapter(mAdapter); - - // This extends the layout space so that preloading happen for the {@link RecyclerView} - mRecyclerView.setLayoutManager(new LinearLayoutManager(getContext()) { - @Override - protected int getExtraLayoutSpace(State state) { - DeviceProfile grid = mLauncher.getDeviceProfile(); - return super.getExtraLayoutSpace(state) - + grid.availableHeightPx * PRELOAD_SCREEN_HEIGHT_MULTIPLE; - } - }); + mRecyclerView.setLayoutManager(new LinearLayoutManager(getContext())); } // |