Questions tagged [recyclerview-layout]

RecyclerView is a more advanced and flexible version of ListView. It was introduced with the Android L Developer Preview, but is also available as part of the Support Library.

RecyclerView is a more advanced and flexible version of ListView, introduced in the Android L Developer Preview but also backported to the Support Library. It is a container for large sets of views that can be recycled and scrolled very efficiently.

Yo use a RecyclerView, an adapter (extending RecyclerView.Adapter) and a layout manager (extending RecyclerView.LayoutManager) must be provided. By default, RecyclerView provides LinearLayoutManager, which shows the items in a vertical or horizontal scrolling list.

Official Documentation

Tag Usage:

436 questions
10
votes
7 answers

Recyclerview not scrolling smoothly before scrolling finish

i am having problem with scrolling i mean the scrool fast but it's look like lagging before scrolling finish here i define RecyclerView : RecyclerView recyclerView=fragment.getRecyclerView(); LinearLayoutManager layoutManager = new…
10
votes
3 answers

RecyclerView reverse endless scrolling

I'm creating a chat app and I am trying to implement endless scrolling for RecyclerView in a reversed manner, like start from the bottom and scroll up, when top is reached, load more. When the user opens the chat screen, the app gets the last 20…
spongyboss
  • 8,016
  • 15
  • 48
  • 65
9
votes
4 answers

Attach TextView to RecyclerView

I realize the following is incorrect but I suppose you can treat it as pseudocode. I'm wondering, how can I "attach" a whole layout to my RecyclerView so that when I scroll down the layout scrolls out of sight along with it. Presently the TextView…
Martin Erlic
  • 5,467
  • 22
  • 81
  • 153
9
votes
3 answers

RecyclerView expandable cardView

I make small project with RecyclerView with CardView items inside. I created expandable card (expanded by pressing on small button inside the card). Each card always contain visible part (id:top_layout) and expandable part…
Zbyszko
  • 162
  • 3
  • 8
8
votes
4 answers

How to prevent a child of a RecyclerView cell from moving while the user scrolls

I have very long width cells on my horizontal RecyclerView, and I want them to have a header that remains still as the user scrolls horizontally. - Recycler View (A) - - Cell (parent) (B) - - - Header (C) <-- We want that to be still - -…
8
votes
2 answers

RecyclerView inside SwipeRefreshLayout does not show

I implemented one horizontal-scroll item listview using RecyclerView inside scrollview. I want to update the item when user swipe to the end of the listview (item is added after refreshing). The following code is the layout implementation.
8
votes
2 answers

How to know last item in RecyclerView

In my RecyclerViewAdapter, I would like to know if this item is the last. How can I check it? The onBindViewHolder only has the position value @Override public void onBindViewHolder(UserViewHolder userViewHolder, int position) { //DO…
JayVDiyk
  • 4,277
  • 22
  • 70
  • 135
7
votes
0 answers

Crash at ChildHelper.java line 352 and 355

Our application has a listView built using RecyclerView and items get added, removed, moved, changed on different use-cases and i use the default animation There are 1000's of crash related to the ChildHelper class in android and the code that…
7
votes
4 answers

Can someone explain what getItemCount method in RecyclerView.LayoutManager return?

The documentation says the following about getItemCount(): Returns the number of items in the adapter bound to the parent RecyclerView. Note that this number is not necessarily equal to State#getItemCount(). So, does it return all the items in…
7
votes
1 answer

How to get view from RecyclerView at specific adapter position and get values from those views?

I have RecyclerView having an ImageView and a TextView for each row layout.In ViewHolder in RecyclerViewAdapter, I have click listener as v.setOnClickListener(new View.OnClickListener() { @Override public void…
7
votes
4 answers

Recyclerview not displaying items

Before setting the dataset to the adapter, I am getting the dataset from the Room database, and then I set the data to the adapter and set the adapter to the recyclerview. Currently there are 2 items in the list. From my logs I see that all methods…
androgirl
  • 355
  • 2
  • 7
  • 17
7
votes
1 answer

Recyclerview set clipChildren

How can I allow the children of my RecyclerView to draw on each other like children of a ViewGroup normally do with clipChildren="false"? I use CardViews in my RecyclerView and I want the shadow of one CardView to cover the CardView below.
7
votes
1 answer

RecyclerView items change size after refresh

I have a RecyclerView as the following image presents: This is the setup code for this RecyclerView: RecyclerView.LayoutManager layoutManager = new GridLayoutManager(this,…
7
votes
4 answers

RecyclerView not scrolling to the bottom

I followed the recyclerview guidelines and built one for the app I am making, but it does not scroll to the bottom for some reason. I compared it with google code snippets, as well as other code snippets online and can't see the difference. I have…
1
2
3
29 30