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

Default data not showing in RecyclerView

It's not showing the default data I set in restoList. I was just trying to follow the Recycler View Example from https://www.androidhive.info/2016/01/android-working-with-recycler-view/ I think my code is somewhat identical now but it still doesn't…
0
votes
1 answer

not able to change background of image and video files on long click in recycler view

I am trying to change background of selected files and folders on long click in recycler view. It is working for all kinds of files except video and image files. How can I fix that ? MyRecyclerViewAdapter.java : (ViewHolder is an inner class) //…
0
votes
0 answers

Removing Toolbar on longclick the item

How to replace toolbar with contextual menu .... I had tried but i got 2 toolbar one is required contextual menu and other is normal toolbar as shown in pic
0
votes
1 answer

RecyclerView Item's Background Color Not Getting Updated Properly

I have a recyclerview to show tables at restaurant, if a table has an active order then I'm setting the background color to Amber. Moreover, if I click on any table, it's background should become grey (I'm using setSelected for this) It works fine…
0
votes
6 answers

Generic RecyclerView adapter

I want to have generic RecyclerView to be able to reuse it. In my case I have 2 models: CategoryImages and Category. While trying to add constructor() it brings the following errors. I know the second one is because it understands like both primary…
0
votes
2 answers

How to display a dynamic list of buttons one aside another?

I am using Recyclerview with StaggeredGridLayoutManager StaggeredGridLayoutManager gridLayoutManager = new StaggeredGridLayoutManager(3, StaggeredGridLayoutManager.VERTICAL); recyclerView.setLayoutManager(gridLayoutManager); I want…
0
votes
1 answer

Implementing a recyclerview with multiple viewolder and data binding library

I'm trying to use the databinding library with a recyclerview with multiple viewholders (with shared elements). I tried solutions that involve casting and generics. Neither worked. Is there a way to relate different ViewDataBinding classes that…
0
votes
0 answers

Horizontally scrollable grid view

I am designing an activity that should have a 2*2 grid. There are other UI elements in the activity as well . The first half of the activity should take up this grid view. This grid view has to be horizontally scrollable and on every scroll,…
0
votes
2 answers

adding items to realm with auto increment id

i am trying to add items to a realm database while manually implementing the auto increment id so it is easy for deleting items. this is the add button which im trying to auto increment the id for the rows at add.setOnClickListener(new…
user6677716
0
votes
0 answers

How to show "load more" or "read more" effect in recylerview at the end and show only first few cards?

I want to show only first few cards of the recyclerview and show a button such as load more or read more then on clicking on it show little more cards and so on. What i have thought to do is making a button under recyclerview and making only first…
0
votes
0 answers

How to adjust scroll bar in RecyclerView with FastScroller in xamarin android?

I want to implement fast scroll with bubble text view in xamarin.android. I took reference from the following link https://github.com/xamarin/monodroid-samples/tree/master/FastScroll This example is not properly working for fewer items. In this…
RMR
  • 599
  • 3
  • 12
  • 35
0
votes
1 answer

How to adjust different height of cardview on tablet and android phone?

I am making an android app that has a cardview inside a recyclerview. Cardview looks good on tablet and takes 40% size of screen. When i run it on a 5" android device, cardview covers 80% of screen size. Please check the code below and suggest some…
0
votes
0 answers

Showing RecyclerView ItemAnimation for child RecyclerView inside parent RecyclerView

I have below layout structure for homepage of one of my apps- My problem is that the recyclerview above has 4 custom…
0
votes
3 answers

Want to repeat items in recyclerview

I want to repeat the items in recyclerview. After searching I couldn't find any soulution. I want to start the items again from the first after it is completed loading. I have done simple coding of getting data in recyclerview. public class…
0
votes
2 answers

RecyclerView 2 lists in one

I am trying to create something similar to this: RecyclerView Instead of folders and files I want to have incomplete items and completed items. I am new to RecyclerViews, how would I manage to get two unrelated lists such as folders and files into…