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
1
vote
2 answers

Multiple views in RecyclerView

I'm working with a recyclerView in my app that has three different layouts for it's rows. I change the visibility of the different views in the layout for each row depending on the the type of data. For example, if it's a text post I change the…
moe_nyc
  • 307
  • 1
  • 4
  • 18
1
vote
4 answers

What is the best trick to handle null values in Recycler-view onBindViewHolder?

I handled many exception regarding null/index-outof-bound etc. But i am thinking that this is not right way to go like if/else , so anyone can guide me How to handle all null condition in onBindViewHolder? @Override public void…
1
vote
1 answer

How to display data in RecyclerView using Retrofit2 API?

First of all, I'm new to Android/Java/Kotlin development. I'm using Retrofit2 to retrieve data from Udacity API. I can see the response in the Logcat, but when I try to display it in RecyclerView there is just a blank screen. I think the error is in…
1
vote
2 answers

LinearLayout below dynamic RecyclerView listview

I have a Dynamic list and the static linear layout below last item. When list is empty the LinearLayout is on the top of the page. Whenever I have added element into the list the LinearLayout is moving below the last item of the list. When the list…
Expiredmind
  • 788
  • 1
  • 8
  • 29
1
vote
0 answers

Vertical RecyclerView containing nested RecyclerView

Structure of my Android app is forcing me to create Vertical Nested RecyclerView inside Vertical Nested RecyclerView because of the pre-drawing all nested items inside every RootRecyclerView. The View of RootRecyclerView has approximately 5 - 10…
1
vote
0 answers

highlighting items of recyclerView

I want to highlight the selected list item totally, not only background color but the whole list item should have same color. This is the one without highlighting I want the output as this was I am getting just the background color. I have used…
konda rahul
  • 141
  • 1
  • 1
  • 11
1
vote
1 answer

Best way RecyclerView change itemLayout of all items?

I want a button to toggle list_item_layout for recyclerView. I looked on various samples on the so and this https://github.com/gjiazhe/LayoutSwitch (but it's dealing with gridlayoutmanager) I need list layout manager, but different layout files. But…
1
vote
2 answers

Recyclerview layout not working in fragment

I'm facing an issue regarding RecyclerView in fragment. I moved my recyclerview from activity to fragment. After moving to fragment. it shows error No adapter attached; skipping layout Here is my code public class LatestProperty extends Fragment…
1
vote
2 answers

Getting click on empty/whitespace of recyclerview

I need to show images in horizontal RecyclerView, and this RecyclerView is inside a row of RecyclerView. Now sometimes I receive 2 or 3 images and sometimes more that can fit in its width. So, i want it to be Scrollable when there are more items…
Safeer
  • 1,407
  • 1
  • 25
  • 29
1
vote
0 answers

Populate Recyclerview Header with data

I am using heterogeneous Recyclerview and I am also using dataBinding. It has a header and two more items. Now, from the API, I get the data for the header but as an object, not as a list. For now, the API doesn't provide a list, so it's just dummy…
1
vote
3 answers

How to add Linear Layout to be always the first element in RecyclerView?

I have a RecyclerView with CardView which display the data read from the database.And this have no problem with it. Now the problem is,I want to add a Linear layout which content both ImageView and TextView inside in the same RecyclerView,and make…
ken
  • 2,426
  • 5
  • 43
  • 98
1
vote
1 answer

recyclerview android mix data pictures after scroll

i am developing and app that should show users instagram posts in a recyclerview...i get all data correctly but after i scroll my recyclerview pictures get mess up and one picture shows twice ...and other messed ups in my list. here is my onbind…
1
vote
0 answers

Android UltimateRecyclerView Unexpected Error When Scrolling

When I scroll through my list (using ultimateRecyclerView), my apps show Unexpected Error Dialog and quit. What is wrong and how to solve it?
1
vote
0 answers

Does RecyclerView does layuot processing stuff for the elements which it has drawn already when drawing new element?

What exactly I am confused is that RecyclerView has a method setHasFixedSize(true) what exactly happens when this method is used on recyclerview instance. Does it recalculate layout stuff or the elements which it has already drawn. Any help is…
1
vote
1 answer

Recyler View with multiple toggle button checking the button randomly on scroll

I have a recycler view with with multiple toggle buttons on click of which the state is changed and the newly updated state is sent to the server by calling a service on changing the state of the toggle button. The problem i am facing is that…