mirror of
https://github.com/Docile-Alligator/Infinity-For-Reddit.git
synced 2026-08-18 02:51:58 +00:00
Continue implementing grid layout for gallery posts.
This commit is contained in:
@ -2644,12 +2644,12 @@ public class PostDetailRecyclerViewAdapterNew extends RecyclerView.Adapter<Recyc
|
||||
if (mShowGalleryMediaAsGrid) {
|
||||
adapter.setIsGridLayout(true);
|
||||
layoutManager = new GridLayoutManager(mActivity, 3);
|
||||
PostGalleryGridLayoutItemDecoration itemDecoration =
|
||||
new PostGalleryGridLayoutItemDecoration(mActivity, R.dimen.staggeredLayoutManagerItemOffset, 2);
|
||||
binding.galleryRecyclerViewItemPostDetailGallery.addItemDecoration(itemDecoration);
|
||||
} else {
|
||||
layoutManager = new LinearLayoutManagerBugFixed(mActivity, RecyclerView.HORIZONTAL, false);
|
||||
}
|
||||
PostGalleryGridLayoutItemDecoration itemDecoration =
|
||||
new PostGalleryGridLayoutItemDecoration(mActivity, R.dimen.staggeredLayoutManagerItemOffset, 2);
|
||||
binding.galleryRecyclerViewItemPostDetailGallery.addItemDecoration(itemDecoration);
|
||||
binding.galleryRecyclerViewItemPostDetailGallery.setLayoutManager(layoutManager);
|
||||
binding.galleryRecyclerViewItemPostDetailGallery.addOnScrollListener(new RecyclerView.OnScrollListener() {
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user