Questions tagged [android-recyclerview]

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

The RecyclerView widget is a more advanced and flexible version of ListView and GridView. This widget is a container for displaying large datasets that can be scrolled very efficiently by maintaining a limited number of views. Use the RecyclerView widget when you have data collections whose elements change at runtime based on user action or network events.

• See how to create a list with RecyclerView.


RecyclerApdater Adapter optimized for RecyclerView

The RecyclerView class simplifies the display and handling of large data sets by providing:

  1. Layout Managers for positioning items
  2. Default animations for common item operations, such as removal or addition of items

enter image description here

Tag Usage:

29237 questions
7
votes
6 answers

Why RecyclerView items disappear with scrolling

I am using a RecyclerView in my app but when I scroll on my RecyclerView my items will disappear! I used this code for a lot of RecyclerView but this time I don't know what is happening. there is my code for my Activity: public class ActivityStartup…
Ehsan
  • 2,676
  • 6
  • 29
  • 56
7
votes
2 answers

RecyclerView is not trully wrap_content at the ScrollView

I have a ScrollView, which contains a vertical LinearLayout. This is a place, where I add some amount of Views called "Section". "Section" is a LinearLayout, which contains a TextView and `RecyclerView.
7
votes
1 answer

tools:text for RecyclerView items

I know that when you set tools:text="Sample text" within a TextView, you'll see the sample text in Preview mode in Android Studio, but not within the actual app. I'd like to do this for items in a RecyclerView, but I can't seem to be able to.…
7
votes
2 answers

Is there anything similar to Android RecyclerView for C# Winforms

Currently am working on an winforms application which shows contacts, but I have a problem with memory. For each contact I build a panel with labels inside for name inside for name and number, and I will add this to my main Panel. Assume I have…
anil kumar d
  • 157
  • 2
  • 10
7
votes
8 answers

Android - How To retrieve EditText value from RecyclerView in MainActivity

How can I retrieve the value from all EditTexts created by the RecyclerView in MainActivity? In my RecyclerView Adapter I'm extending my inner class: public class MyPersonalAdapter extends…
Halfacht
  • 924
  • 1
  • 12
  • 22
7
votes
1 answer

Best way to notify RecyclerView Adapter from Viewholder?

I have a RecyclerView with multiple item view types so they are broken into separate ViewHolder classes. Before, when all the ViewHolders were in the same class as the RecyclerView Adapter, I could update the adapter directly when an item was…
7
votes
11 answers

RecyclerView Multiple Layout View(s) in an Adapter class

Here is what I have achieved ? 3 different sections, 10 different items in each section. Here is the tutorial link I am following and below is the Screenshot: Trying to show different Views for each and every Section. Like: For Section 1…
Sophie
  • 2,594
  • 10
  • 41
  • 75
7
votes
1 answer

RecyclerView inside RecyclerView is not scrolling

I have a Recyclerview with GridLayoutManager whose child items may have a vertical RecyclerView inside it. Here is the screenshot: I have created adapters for this scenario. It shows it properly but internal Recyclerview is not scrolling no matter…
Khawar Raza
  • 15,870
  • 24
  • 70
  • 127
7
votes
3 answers

Elevated RecyclerView items get progressively deformed (elevation changes)

Any idea why RecyclerView items get deformed , each consecutive item gets worse? UPDATE: I'm using CardViews and now there's no view "deformation" but the shadow/elevation height changes. It seems that elevation gets higher depending on where on the…
7
votes
3 answers

Adding progressbar at the end of recyclerview

In my app, I send a volley request which fetches list items one-by-one, not all at once. I want to implement a progressbar at the end of the recyclerview when the data is being fetched. The class 'updateAdapter' updates the adapter and I was…
Arpan Kc
  • 928
  • 1
  • 6
  • 19
7
votes
1 answer

How to force RecyclerView to scroll when there's not enough items to fill the height of the screen

I made a RecyclerView inside a NavigationView with a custom first item as an equivalent to ListView's addHeaderView(). On the bottom part of that header layout I placed an EditText so that I can filter out the list below. What I wanted to do was to…
leondzn
  • 97
  • 9
7
votes
1 answer

RecyclerView is creating ViewHolders for all items at once

I have main RecyclerView which contains other RecyclerViews (let's call them subRecyclerViews). The number of subRecyclerViews is based on the data received from server. The problem is, that whenever a subRecyclerView is about to become visible, it…
Mischmo
  • 75
  • 2
  • 7
7
votes
3 answers

Lags when RecyclerView scrolling

I can not understand what is the reason the brakes when you scroll through my RecyclerView. Scrolling is called by mRecyclerView.smoothScrollToPosition(position); When you scroll through the list of twitches (rendering time frame>…
Nikita G.
  • 720
  • 1
  • 14
  • 22
7
votes
2 answers

Android animation stop works in recyclerview when view go off the screen

I set animaion like this: @Override public void onBindViewHolder(ViewHolder holder, int position) { Animation anim = AnimationUtils.loadAnimation(context, R.anim.rotate); holder.windPropellers.setAnimation(anim); …
7
votes
3 answers

RecyclerView within ScrollView wrap_content height not working as intended

I have a RecyclerView embedded within a ScrollView. Here is the complete layout:
Devarshi
  • 16,440
  • 13
  • 72
  • 125