Using inbuild smooth scroller instead of custom fastscrolling logic

Change-Id: I9208720c3bf164bd664e5bacd75b672573fe7601
This commit is contained in:
Sunny Goyal
2020-04-17 16:31:40 -07:00
parent f01f25b579
commit 355e845851
4 changed files with 69 additions and 209 deletions

View File

@@ -71,11 +71,6 @@ public class AllAppsGridAdapter extends RecyclerView.Adapter<AllAppsGridAdapter.
public static final int VIEW_TYPE_MASK_DIVIDER = VIEW_TYPE_ALL_APPS_DIVIDER;
public static final int VIEW_TYPE_MASK_ICON = VIEW_TYPE_ICON;
public interface BindViewCallback {
void onBindView(ViewHolder holder);
}
/**
* ViewHolder for each icon.
*/
@@ -186,7 +181,6 @@ public class AllAppsGridAdapter extends RecyclerView.Adapter<AllAppsGridAdapter.
private int mAppsPerRow;
private BindViewCallback mBindViewCallback;
private OnFocusChangeListener mIconFocusListener;
// The text to show when there are no search results and no market search handler.
@@ -247,13 +241,6 @@ public class AllAppsGridAdapter extends RecyclerView.Adapter<AllAppsGridAdapter.
mMarketSearchIntent = PackageManagerHelper.getMarketSearchIntent(mLauncher, query);
}
/**
* Sets the callback for when views are bound.
*/
public void setBindViewCallback(BindViewCallback cb) {
mBindViewCallback = cb;
}
/**
* Returns the grid layout manager.
*/
@@ -319,9 +306,6 @@ public class AllAppsGridAdapter extends RecyclerView.Adapter<AllAppsGridAdapter.
// nothing to do
break;
}
if (mBindViewCallback != null) {
mBindViewCallback.onBindView(holder);
}
}
@Override