Skip to content

Instantly share code, notes, and snippets.

@amyu
Created October 6, 2015 15:00
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save amyu/103af9b79d706b438c7c to your computer and use it in GitHub Desktop.
Save amyu/103af9b79d706b438c7c to your computer and use it in GitHub Desktop.
public class PreLoadLayoutManager extends LinearLayoutManager {
private final int mDisplayHeight;
public PreLoadLayoutManager(Context context) {
super(context);
mDisplayHeight = context.getResources().getDisplayMetrics().heightPixels;
}
@Override
protected int getExtraLayoutSpace(RecyclerView.State state) {
return mDisplayHeight;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment