Skip to content
Advertisement

Tag: android-recyclerview

Android: set fixed item on RecyclerView

I have a RecyclerView, when I click in the first view it adds another view like in the image, what I want is to set the “add” view which ID is “1” to be fixed in the last position of the recycler instead in the first. My adapter: In the activity: Answer I solved it by creating a custom adapter

Recyclerview not call onCreateViewHolder

My RecyclerView does not call onCreateViewHolder, onBindViewHolder even MenuViewHolder constructor, therefore nothing appears in RecyclerView. I put logs for debugging, and no log is shown. What might be the problem? My adapter: My custom row XML: and my Fragment: Answer Your getItemCount method returns 0. So RecyclerView never tries to instantiate a view. Make it return something greater than 0.

Advertisement