Top "Android-recyclerview" questions

The RecyclerView widget is a more advanced and flexible version of ListView and GridView.

How to know whether a RecyclerView / LinearLayoutManager is scrolled to top or bottom?

Currently I am using the follow code to check whether SwipeRefreshLayout should be enabled. private void laySwipeToggle() { if (mRecyclerView.getChildCount() == 0 || …

android android-recyclerview
How to set RecyclerView app:layoutManager="" from XML?

How to set RecyclerView layoutManager from XML? <android.support.v7.widget.RecyclerView app:layoutManager="???" android:layout_width="match_parent" …

android xml android-recyclerview androidx
RecyclerView GridLayoutManager: how to auto-detect span count?

Using the new GridLayoutManager: https://developer.android.com/reference/android/support/v7/widget/GridLayoutManager.html It takes an explicit span …

android android-recyclerview android-gridlayout gridlayoutmanager
Is there any way to enable scrollbars for RecyclerView in code?

As we saw, RecyclerView is more effective than ListView, so I prefer to use it in my project. But recently …

android scrollbars android-recyclerview
how to highlight the selected Item of Recycler View?

I have a Recycler View with the Images loaded from the Internal Storage. I want to Highlight the selected item …

android material-design android-recyclerview
Using the recyclerview with a database

Currently there is no default implementation of RecyclerView.Adapter available. May be with the official release, Google will add it. …

android simplecursoradapter android-recyclerview
RecyclerView horizontal scroll snap in center

I'm trying to make a carousel-like view here using RecyclerView, I want the item to snap in the middle of …

android horizontal-scrolling android-recyclerview
Android: How to get the current X offset of RecyclerView?

I'm using a Scrollview for an infinite "Time Picker Carousel" and found out, that it is not the best approach (…

android scroll position android-recyclerview
Recyclerview not call onCreateViewHolder

My RecyclerView does not call onCreateViewHolder, onBindViewHolder even MenuViewHolder constructor, therefore nothing appears in RecyclerView. I put logs for debugging, …

java android android-recyclerview
Android RecyclerView : notifyDataSetChanged() IllegalStateException

I'm trying to update the items of a recycleview using notifyDataSetChanged(). This is my onBindViewHolder() method in the recycleview adapter. @…

android android-recyclerview