From ff4bca1251ce3d17b326554fdb1717f7d54cc140 Mon Sep 17 00:00:00 2001 From: tibbi Date: Wed, 20 Jan 2021 22:49:29 +0100 Subject: [PATCH] allow interpreting grid decoration as string --- .../gallery/pro/helpers/GridSpacingItemDecoration.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/helpers/GridSpacingItemDecoration.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/helpers/GridSpacingItemDecoration.kt index d6d0f7ca7..f9c991740 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/helpers/GridSpacingItemDecoration.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/helpers/GridSpacingItemDecoration.kt @@ -7,7 +7,10 @@ import com.simplemobiletools.gallery.pro.models.Medium import com.simplemobiletools.gallery.pro.models.ThumbnailItem class GridSpacingItemDecoration(val spanCount: Int, val spacing: Int, val isScrollingHorizontally: Boolean, val addSideSpacing: Boolean, - val items: ArrayList, val useGridPosition: Boolean) : RecyclerView.ItemDecoration() { + var items: ArrayList, val useGridPosition: Boolean) : RecyclerView.ItemDecoration() { + + override fun toString() = "spanCount: $spanCount, spacing: $spacing, isScrollingHorizontally: $isScrollingHorizontally, addSideSpacing: $addSideSpacing, " + + "items: ${items.hashCode()}, useGridPosition: $useGridPosition" override fun getItemOffsets(outRect: Rect, view: View, parent: RecyclerView, state: RecyclerView.State) { val position = parent.getChildAdapterPosition(view)