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
1 answer

RecyclerView does not get empty

My application has a main activity with a list of items (let's say item A and item B), every item will launch the same activity (UserGalleryActivity) but the recyclerView inside the Activity should display only the items related to the item (let's…
1
vote
2 answers

why recycler view max height doesn't work? Also i tried recycler view add inside constraint layout but it doesn't work

I want to max height to recycler view but doesn't work for me. I found some answers but they didn't work for me. I tried many ways to fix that. but I couldn't found the answer. this is XML code. Anyone can help me to solve that problem…
1
vote
2 answers

RecyclerView.Adapter return null object reference inside Fragment with viewPager

I am trying to create the page that have view pager with mvvm architecture. So what i trying to do is showing the Recycler view inside the fragment of the first tab by using observable method. But when i try to set the content is of the adapter…
1
vote
3 answers

How to increase faster recyclerView load?

I am using recyclerview to load data from my server. There are no images only the texts will be loaded from the server. But the loading speed is quite slow.Now , I want to know if there are any ways to improve the load time. Although I checked…
1
vote
1 answer

DividerItemDecoration will not work no matter what I do

This is the code for setting the decoration :- recyclerView.addItemDecoration(new DividerItemDecoration(recyclerView.getContext(), DividerItemDecoration.HORIZONTAL)); This is the xml :-
1
vote
1 answer

RecycleView change index when using refresh_from_data() in Kivy

I'm trying to create a simple table where selecting one item in the RecycleView selects the entire row. This has been solved by changing the state of each togglebutton on the clicked row, through its index. However, if I want to manually add some…
1
vote
3 answers

How to change attribute of view programatically from the view in my recyclerView in my fragment?

I set the margin of the view (card view) in my xml of my item file, this xml item file will be used in for my recyclerView adapter. As you can see in my xml below, that I have given margin to top, bottom, start and end. and I want to change the…
Alexa289
  • 8,089
  • 10
  • 74
  • 178
1
vote
3 answers

Access ViewHolder parameter in onActivityResult

I have a Recylerview with Button and TextView as params. I am opening a file chooser on button click. @Override public void onBindViewHolder(final FileChooserAdapter.MyViewHolder holder, final int position) { PojoClass pojoClass =…
1
vote
2 answers

How can I get access to outside views from an Adapter

I have a recyclerview in my app showing a list of content. If a user is subscribed, they can proceed to read the full content and if not the recyclerview is hidden and a subscribe layout is shown. Layout file
Boron
  • 99
  • 10
  • 34
1
vote
3 answers

Each Recyclerview item is shown in a whole page

This is my XML code for RecyclerView item. The problem is, each item is shown in a whole page of app. please help me fixing this:
Jack Smith
  • 21
  • 3
1
vote
1 answer

MotionLayout Expanding Recycler List View - how to reset a transition

I feel like I am being silly, I want to use MotionLayout on an ViewHolder within my RecyclerView to animate between two states (the current playing song is expanded, while the last playing song is shrunk) However it seems that the recyclerview is…
AidenFry
  • 248
  • 3
  • 12
1
vote
2 answers

ImageView RecyclerView Lazy Load

I have a RecyclerViewAdapter which in onBindViewHolder, I make an AsyncTask call to download the image required from Google Cloud Storage. There are some items in the RecyclerViewAdapter which call for the same image. I tried to deal with this by…
Rafiq07
  • 37
  • 1
  • 11
1
vote
2 answers

How do I show my fab on scroll when the first item in the recycler view is not visible but hide when the first item is visible?

So I am trying to implement a FAB button such that, when I scroll my recycler view and the first item is not visible (scrolled up etc) , fab button should be visible, else it should be hidden if the first position is showing. Right now I have…
1
vote
0 answers

Dynamic width item in recyclerview Android

i want to make dynamic width items in recyclerview as shown in below image. I'd tried a lot for finding solution but i didn't found any perfect solution. i found solution that we can create dynamic size items using StaggeredGridLayout but as i…
1
vote
0 answers

show image on RecycleView

I try to make a table with data from a SQL DB and images not from a DB. I have tried several things but the image don't show up. I used this code and modified it: Link to Stackoverflow Code Code snippets that i Changed in Main.py import…
Richard
  • 33
  • 4