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
2
votes
0 answers

Reyclerview populating data only after edtitext above is clicked

I am facing an issue. The recyclerview is having data but it is populated only when the edittext above that is clicked and keyboard is opened. Please guide me. I think something is wrong with views.
2
votes
2 answers

RecyclerView not displaying data properly every time

In recyclerview , some time it shows the output on the first execution and sometimes, it shows the output on the second or third time... and the worst thing is, some time it doesn't show any data at all. The links from which I am getting data are…
Umair
  • 438
  • 1
  • 8
  • 19
2
votes
0 answers

RecyclerView Expanded Item shadow / elevation

Edit: In my Recyclerview the itemViews can expand and collapse. The expandView is a layout which gets inserted under the clickedItemPosition. Everything works fine, but in following to the Google Material Design Guide-Lines the expanded items should…
2
votes
0 answers

Notify RecyclerViewAdapter from MainActivity

In my MainActivity, I handle my methods for database changes and also the listen for an icon clicks in the toolbar. The icon performs that the list from database (shown in Recycler View) gets ordered ascending/descending. But the Problem is when i…
2
votes
1 answer

Recycler View Animation, old ViewHolder remains visible

I'm trying to create a simple slide in animation for an existing recycler view. Lets say the recycler holds 50 items, at some point the dataset has change and now contains only 40 items, the items have been replaced, all the previous 50 items are…
Aviran
  • 5,160
  • 7
  • 44
  • 76
2
votes
0 answers

Why is my recyclerview mixing up data when scrolled?

I am using a recycler-gridview to show few card items. It works properly, till I start scrolling down. All items gets mixed up. I know this i happening because of recycling. But how to handle this? public void onBindViewHolder(ViewHolder viewHolder,…
Panda
  • 152
  • 2
  • 10
2
votes
1 answer

RecyclerView in Android not working without any error messages

I have followed different tutorials and official documentation trying to implement RecyclerView but it's not working properly and I get no error messages I hope someone can see what I'm missing: my dependencies: dependencies { compile…
2
votes
0 answers

Setting the layout of the swiped card in RecyclerView using ItemTouchHelper

I created a RecyclerView and attached it to an ItemTouchHelper, so I can swipe the items in the list. The problem is, when I swipe an item, the separator (2dp high View) swipes with it - there seems to be an empty layout below my item. Is there a…
2
votes
3 answers

Recyclerview as Snappy Gallery

I've been trying to figure this out on my own, but no chance. What I need is the RecyclerView (horizontal scrolling) to always show 3 items. And whenever the user flings or scrolls left and right, it should snap to the next 3 items, if there are any…
Lanbo
  • 15,118
  • 16
  • 70
  • 147
1
vote
0 answers

Retaining expandable recyclerview's layout while retrieving and updating data from API

I currently have a fully functioning expandable RecyclerView (with two distinct views: one for the header and the other for the contents of each header). The contents of each card under a header is retrieved from an API call to my back end. Today, I…
1
vote
0 answers

Issue with recyclerview dependency after migrating to androidx

I'm completely rebuilding an old project, and have only kept the xml files (which show no error). I chose to update to androidx, and have synced all dependencies correctly, except for recyclerview. Whenever I try to sync, it would show the error log…
1
vote
1 answer

RecyclerView/SnapHelper - How to set variable position of the cards so that they peek differently based on position

I am new to android and hence RV and I am trying to achieve the layout where the first and last card are not centered and instead show more of the cards after and before them. Maybe at In this case I can see 16dp for the second cards and same thing…
1
vote
2 answers

RecyclerView drawing issue

I'm starting new activity with RecyclerView from main activity. Items displaying correctly. But on scroll something strange happened. Items are not correctly rendered. Same RecyclerView works correctly if it's in main screen. it's copy of code from…
P.Zaw
  • 43
  • 1
  • 4
1
vote
1 answer

How to fix RecyclerView OnClick gap display bug?

I'm setting up a RecyclerView who contains mulptiple ImageButtons, Each ImageButton has a OnClick action (launch an Activity) My problem is, the OnClick action is not working on ImageButtons, but in a little space between each ImageButton (if I want…
1
vote
1 answer

StaggeredLayoutManager disturbs positions of cells during adjustment in RecyclerView

StaggeredLayoutManager sometimes makes cells position disordered during scroll when trying to adjust them. I've a HeaderView and NormalViews in my RecyclerView. Following is the setup code: int spacing = (int)…