Skip to content

Instantly share code, notes, and snippets.

@chnouman
Created September 27, 2017 11:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chnouman/ebea49c840904d378a69cc7244084816 to your computer and use it in GitHub Desktop.
Save chnouman/ebea49c840904d378a69cc7244084816 to your computer and use it in GitHub Desktop.
// Create a custom SpanSizeLookup where the first item spans both columns
/*layoutManager.setSpanSizeLookup(new GridLayoutManager.SpanSizeLookup() {
@Override
public int getSpanSize(int position) {
if (position == 0) {
return 1;
}
if (StoriesFragment.dataList.get(position) instanceof NativeAdView)
return 2;
else if (StoriesFragment.dataList.get(position) instanceof ModelForDailyandRecent)
return 1;
return 2;
}
});*/
@chnouman
Copy link
Author

specially used in native adds module

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment