|
|
|
|
@ -600,28 +600,11 @@ enum class RowViewType(private var layoutRes: Int) : ViewIdentifier { |
|
|
|
|
itemView.findViewById<RecyclerView?>(R.id.recyclerView)?.let { recyclerView -> |
|
|
|
|
|
|
|
|
|
setLayoutManager(this.spanCount) |
|
|
|
|
|
|
|
|
|
// val spanCount = row.unit.spanCount |
|
|
|
|
val spacing = 2.px |
|
|
|
|
val includeEdge = true |
|
|
|
|
// |
|
|
|
|
// val viewManager = object : GridLayoutManager(itemView.context, spanCount) { |
|
|
|
|
// override fun checkLayoutParams(lp: RecyclerView.LayoutParams?): Boolean { |
|
|
|
|
// val side = width / this.spanCount - 4.px |
|
|
|
|
// lp?.let { params -> |
|
|
|
|
// params.width = side |
|
|
|
|
// params.height = side |
|
|
|
|
// } |
|
|
|
|
// return true |
|
|
|
|
// } |
|
|
|
|
// } |
|
|
|
|
|
|
|
|
|
recyclerView.apply { |
|
|
|
|
setHasFixedSize(true) |
|
|
|
|
addItemDecoration(ItemOffsetDecoration(spacing)) |
|
|
|
|
|
|
|
|
|
// layoutManager = viewManager |
|
|
|
|
// addItemDecoration(GridSpacingItemDecoration(spanCount, spacing, includeEdge)) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|