summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHyunyoung Song <hyunyoungs@google.com>2016-02-24 02:46:28 +0000
committerandroid-build-merger <android-build-merger@google.com>2016-02-24 02:46:28 +0000
commitdc94611a7210cb246b2877c5cc7c984bae7ec910 (patch)
treef1e810cb4f5f6df5d3a787adb40dbdef9202952e
parent15dc5f4eb62d9daf314011b47c5aa0fa0bee71d3 (diff)
parent2773b01bb73f4f47a37643b6c4e43e94d63e29a5 (diff)
downloadandroid_packages_apps_Trebuchet-dc94611a7210cb246b2877c5cc7c984bae7ec910.tar.gz
android_packages_apps_Trebuchet-dc94611a7210cb246b2877c5cc7c984bae7ec910.tar.bz2
android_packages_apps_Trebuchet-dc94611a7210cb246b2877c5cc7c984bae7ec910.zip
Merge "Change preloading coefficient for widgets tray to improve jankness on low performance devices." into ub-launcher3-burnaby-polish am: 2cb92eb2bb
am: 2773b01bb7 * commit '2773b01bb73f4f47a37643b6c4e43e94d63e29a5': Change preloading coefficient for widgets tray to improve jankness on low performance devices.
-rw-r--r--src/com/android/launcher3/widget/WidgetsContainerView.java14
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 4c901c2be..d7ed9ed6b 100644
--- a/src/com/android/launcher3/widget/WidgetsContainerView.java
+++ b/src/com/android/launcher3/widget/WidgetsContainerView.java
@@ -56,9 +56,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;
@@ -98,16 +95,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()));
}
//