Get center visible item of RecycleView when scrolling
Clash Royale CLAN TAG #URR8PPP Get center visible item of RecycleView when scrolling This is what I want: As image above, I want to draw a center line on RecycleView , then get the center item when scrolling (as well as move left or right) Here is my try to draw a horizontal RecycleView : RecycleView RecycleView HorizontalAdapter adapter = new HorizontalAdapter(data); LinearLayoutManager layoutManager = new LinearLayoutManager(this, LinearLayoutManager.HORIZONTAL, false); recycleView.setLayoutManager(layoutManager); recycleView.setAdapter(adapter); Is there any way to know which item is moved to center of RecycleView ? And how can I scroll RecycleView to left or right just one position? RecycleView RecycleView Update : I tried to use a scroll listener to get middle position, but it doesn't work as aspect. @Override public void onScrolled(RecyclerView recyclerView, int dx, int dy) { super.onScrolled(recyclerView, dx, dy); ...