All Questions

508
votes
10answers
230942 views

How to create RecyclerView with multiple view type?

From https://developer.android.com/preview/material/ui-widgets.html When we creating RecyclerView.Adapter we have to specify ViewHolder that will bind with that adapter. public class MyAdapter exten...
355
votes
35answers
331546 views

RecyclerView onClick

Has anyone using RecyclerView found a way to set an onClickListener to items in the RecyclerView? I thought of setting a listener to each of the layouts for each item but that seems a little too much ...
55
votes
16answers
36973 views

Failed to resolve: com.android.support:cardview-v7:26.0.0 android

i try to add recyclerview to my project and get this error appear and i added it from android studio dependencies
772
votes
29answers
281422 views

Why doesn't RecyclerView have onItemClickListener()?

I was exploring RecyclerView and I was surprised to see that RecyclerView does not have onItemClickListener(). Because RecyclerView extends android.view.ViewGroup and ListView extends ...
212
votes
15answers
129883 views

Is there an addHeaderView equivalent for RecyclerView?

I'm looking for an equivalent to addHeaderView for a recycler view. Basically I want to have an image with 2 buttons be added as a header to the listview. Is there a different way to add a header view...
208
votes
7answers
114495 views

How to filter a RecyclerView with a SearchView

I am trying to implement the SearchView from the support library. I want the user to be to use the SearchView to filter a List of movies in a RecyclerView. I have followed a few tutorials so far and ...
275
votes
30answers
162939 views

How to implement endless list with RecyclerView?

I would like to change ListView to RecyclerView. I want to use the onScroll of the OnScrollListener in RecyclerView to determine if a user scrolled to the end of the list. How do I know if a user sc...
117
votes
16answers
130893 views

recyclerview No adapter attached; skipping layout

just implemented Recyclerview in my code, replacing Listview. everything works fine. The objects are displayed. but logcat says 15:25:53.476 E/RecyclerView﹕ No adapter attached; skipping layou...
600
votes
35answers
360763 views

How to add dividers and spaces between items in RecyclerView?

This is an example of how it could have been done previously in the ListView class, using the divider and dividerHeight parameters: <ListView android:id="@+id/activity_home_list_view" andr...
124
votes
15answers
98625 views

How to use RecyclerView inside NestedScrollView?

How to use RecyclerView inside NestedScrollView? RecyclerView content is not visible after setting adapter. UPDATE layout code updated. <android.support.v4.widget.NestedScrollView xmlns:android="...

Previous Next