GalleryLayoutManager
GalleryLayoutManager copied to clipboard
Not working with Kotlin code
I am trying to implement GallaryLayoutManager
in my kotlin code like below. but unfortunately it is not working with kotlin code.
val layoutManager = GalleryLayoutManager(GalleryLayoutManager.HORIZONTAL)
layoutManager.attach(recyclerView, 0)
layoutManager.setCallbackInFling(true) //should receive callback when flinging, default is false
layoutManager.setOnItemSelectedListener { recyclerView, item, position ->
println("===position=== $position")
}
layoutManager.setItemTransformer(ScaleTransformer())
If anyone have idea please let me know how to fix it.