I'm loading data from SQLite database in RecyclerView in batch of 25 records per load cycle. I figure out every thing but having problem with logic of calling data loading method in RecyclerView scroll listener.  

Problem is list is loading nicely on scroll of recyclerView in emulator but when i tested in physical device, on Lenovo Phab 2 it worked fine but in Mi note 3, list doesn't load consistenly (sometime it loads, sometime not) more records on reaching bottom of scroll. 

Below is the code I'm using in RecyclerView scrolle listener 

```
private val RecyclerView_ScrollListener = object : RecyclerView.OnScrollListener(){
    override fun onScrolled(recyclerView1: RecyclerView?, dx: Int, dy: Int) {
        super.onScrolled(recyclerView1, dx, dy)

        if (dy > 0) {
            if (limit < rowCount_fromDatabase) {
                visibleItemCount = layoutManager_MemberList.childCount
                totalItemCount = layoutManager_MemberList.itemCount
                firstVisibleItemPosition = layoutManager_MemberList.findFirstVisibleItemPosition()

                if (visibleItemCount + firstVisibleItemPosition >= totalItemCount) {
                    limit += 25
                    load_Data()
                }
            }
        }
}

```