Skip to content

Commit

Permalink
added currentVisibileItemPosition to -1 when dragging recyclerview
Browse files Browse the repository at this point in the history
  • Loading branch information
Kunalapk committed Jan 11, 2021
1 parent c8a2137 commit 5e7c29a
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package com.kunalapk.smartrecyclerview.view
import android.content.Context
import android.graphics.Point
import android.util.AttributeSet
import android.util.Log
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
Expand Down Expand Up @@ -245,6 +246,8 @@ class SmartRecyclerView<T> : SwipeRefreshLayout {
}else{
calculateCurrentVisibleItemPosition(false, recyclerView, recyclerView.layoutManager!!)
}
}else if(newState == RecyclerView.SCROLL_STATE_DRAGGING){
smartRecyclerViewListener.setCurrentItemPosition(-1)
}
}

Expand Down

0 comments on commit 5e7c29a

Please sign in to comment.