From 9276408f6d23561922972944a87567ec6caade48 Mon Sep 17 00:00:00 2001 From: Chavi Anyo Date: Mon, 9 Jan 2017 16:38:44 +0100 Subject: [PATCH] fixed bug horizontal smooth scroll was not working --- .../kotlin/com/ch4vi/flowlayoutmanager/FlowLayoutManager.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flowlayoutmanager/src/main/kotlin/com/ch4vi/flowlayoutmanager/FlowLayoutManager.kt b/flowlayoutmanager/src/main/kotlin/com/ch4vi/flowlayoutmanager/FlowLayoutManager.kt index 4a01a7e..4c96d42 100644 --- a/flowlayoutmanager/src/main/kotlin/com/ch4vi/flowlayoutmanager/FlowLayoutManager.kt +++ b/flowlayoutmanager/src/main/kotlin/com/ch4vi/flowlayoutmanager/FlowLayoutManager.kt @@ -420,7 +420,7 @@ class FlowLayoutManager( override fun computeScrollVectorForPosition(targetPosition: Int): PointF { val target = rectList[targetPosition] if (orientation == RecyclerView.VERTICAL) return PointF(0F, target.top.toFloat()) - return PointF(0F, target.right.toFloat()) + return PointF(target.right.toFloat(), 0F) } } scroller.targetPosition = position