<Using spanSizeLookup in Kotlin to set span size b...
# stackoverflow
u
Using spanSizeLookup in Kotlin to set span size based on ItemViewType in GridLayoutManager I have a a RecyclerView that uses GridLayoutManager to display data, I'm trying to span an item fully if the ItemViewType matches being a title. I know how its done in java, but in Kotlin I cant get the override method that returns the position of the item to determine its type. layoutManager = new GridLayoutManager(context, 2); layoutManager .setSpanSizeLookup(new GridLayoutManager.SpanSizeLookup() { @Override public int getSpanSize(int position) { switch...