Android - Get current position from recyclerview with listener when position changed

this my solution :

        recyclerview.addOnScrollListener(new RecyclerView.OnScrollListener() {
        @Override
        public void onScrolled(RecyclerView recyclerView, int dx, int dy) {
            super.onScrolled(recyclerView, dx, dy);
            final int offset = topRv.computeHorizontalScrollOffset();
            if (offset % myCellWidth == 0) {
                final int position = offset / myCellWidth ;
            }
        }
    });

is give me the current position anytime.