Commit cb9164e2 authored by Stefan Niedermann's avatar Stefan Niedermann
Browse files

Fix #890 Grid view: no padding top on Recycler View

parent 40f8fe69
......@@ -38,7 +38,8 @@ public class GridItemDecoration extends SectionItemDecoration {
final int spanIndex = lp.getSpanIndex();
// First row gets some spacing at the top
if (position < spanCount && position < adapter.getFirstPositionOfViewType(ItemAdapter.TYPE_SECTION)) {
final int firstSectionPosition = adapter.getFirstPositionOfViewType(ItemAdapter.TYPE_SECTION);
if (position < spanCount && (firstSectionPosition < 0 || position < firstSectionPosition)) {
outRect.top = gutter;
}
......
- 🐞 Grid view: no padding top on first line in some cases (#890)
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment