Continue implementing grid layout for gallery posts.

This commit is contained in:
Docile-Alligator
2026-08-12 12:22:02 -04:00
parent 543745ee8e
commit fcfe29b476

View File

@ -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