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

The following classes Cannot instantiate- Recycler view

In my project. i accidently change the version of recycler view.when i again change that and tried to sync my project.it shows me a rendering problem.i tried clean and reubuild project.invalidate cachy and restart options but no use.someone plz help…
1
vote
3 answers

how do I get the values selected by the user

I am trying to get values of the selected checkbox on my app. I want to get the items checked by the user in the app and send the items to the server. I have tried doing it but I dont know how do I go about it? Adapter public class MyAdapter…
1
vote
0 answers

Espresso RecyclerView scrollTo throwing AppNotIdleException

I'm trying to test a RecyclerView using Espresso's framework and currently hitting into the following issue - Espresso's method fun scrollToItemAndCheck() { onView(withId(R.id.recycler_view)) …
1
vote
1 answer

How to smooth scroll to specific position in Recycler View (evant/binding-collection-adapter)

I am using evant/binding-collection-adapter to render the list of items. I want to scroll to a specific position when after rendering the list. Following is my code, but it's not working. any help..?? XML. …
1
vote
0 answers

How to NOT scroll after notifyDataSetChanged on a RecyclerView.Adapter

sometimes I'm replacing all the data from my ArrayList datasource like so: private ArrayList data; public void replaceAll(ArrayList newItems) { this.data.clear(); for (int i = 0; i < newItems.size(); i++) { this.data.set(i,…
SudoPlz
  • 20,996
  • 12
  • 82
  • 123
1
vote
1 answer

Creating a custom Recycler list View with Various UI components in one list item

I have a created a list view using the recycler view for the Item list.Each list has movie names having these fields : Price (text view - values ranging from 20-100) Genere (radio button - U/A or spinner) Availability (text view, values ranging…
Raulp
  • 7,758
  • 20
  • 93
  • 155
1
vote
1 answer

Remove data children from RecyclerView adapter without affecting currently visible view

I'm building an infinite horizontal scroll list by using a Recycler view. 1-2 children can be visible on the screen at all times (since their width is more than the screen viewport and so we'll never have more than 2 children visible). Initial…
SudoPlz
  • 20,996
  • 12
  • 82
  • 123
1
vote
1 answer

How to determine the most visible view position after the RecyclerView adapter data change?

I want to determine the most visible item in my RecyclerView and so I use the following method: public int getMostVisibleIndex() { // try to figure which child is the most visible on screen LinearLayoutManager layoutManager =…
SudoPlz
  • 20,996
  • 12
  • 82
  • 123
1
vote
3 answers

Unable to inflate a recyclerView in ViewPager

I am having trouble inflating a recycler view inside a viewPager. The below code is of my MainActivity: @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); …
1
vote
1 answer

RecycleView showing extra space between gaps even using WRAP_CONTENT on layout_height

RecyclerView is showing large spaces in the layout. Note: When you start scrolling down, the items appear normally, but when you go back up, you start to see large white spaces between the items. Note2: All parents layouts are configured with…
1
vote
1 answer

How to identify the position of child item of section adapter using recycler view while scrolling

I have a recycler view which has section adapter which consists of chat messages and we have ids for every message. On click of message we are able to get the ids of messages but what i want is to get the id of particular message which is currently…
1
vote
0 answers

Save item from recyclerView and add it in an another recyclerView

I've got a recyclerView with items that I get from a MySQL database. Now I want that the user can touch one of those items and "save" it locally. This saved item should be add in another recyclerView layout called "My saved items". This is my code…
1
vote
2 answers

How to fix RecyclerView's StaggeredGridLayoutManager on scrolling separates the content and fly randomly

I was trying to fetch remote images which I've an API and display it in a Masonry Grid (Pinterest Style). At first I was using simple GridView it was working perfectly but without the Masonry style. Then, after various research I was finally…
1
vote
0 answers

RecyclerView is not reusing cell properly

The recyclerView list size is 16. On my phone, 9 and a half cell is displayed on the screen first time, It means 10 times the OnCreateViewHolder method is called. After that if i scroll, 4 times the OnCreateViewHolder method is called; it means it…
1
vote
1 answer

Recyclerview checkbox automatically selects another checkbox when clicked

I am developing an app that requires that the customer selects all the prices for different problems. I have implemented the recyclerview and inflated the textview and checkbox on the recyclerview but the problem is that when a checkbox is selected…