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

How to show all the tabs in viewPager at time

I'm using viewPager that has a fragment and that fragment has a recyclerView. I'm trying to display all the tabs of viewPager at the same time. Is that possible or there is any different approach to deal with the situation.
1
vote
1 answer

RecyclerView.Adapter and GridLayoutManager with spanCount great than 4 continuously recreates ViewHolders

I am working with GridLayoutManager and I have encountered unexpected RecyclerView's behaviour. If spanCount is greater than 4, the RecyclerView continuously recreates ViewHolders on scrolling. override fun onCreate(savedInstanceState: Bundle?)…
1
vote
1 answer

how to refresh/update RecyclerView on button click

I use RecyclerView with fragment to show my data from SQLite database. I have two button outside RecyclerView to change query that retrieve data from database.First button show data for (Monday-Friday) and second button show data for (Saturday-…
1
vote
1 answer

Images not loading from URL by Picasso from Firebase Database

Firebase image Model class public class Category { private String Name; private String Image; public Category(String name, String image) { Name = name; Image = image; } public Category() { } public…
1
vote
0 answers

How to set items to be one column and the column stretch horizontal in GridLayout?

I wish to be below. But now, it look like below. I know why it is. Below is my code. this.mFilterCategoryListAdapter = new…
1
vote
2 answers

Disable RecyclerView Buttons

RecyclerView layout @NonNull @Override public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup viewGroup, int i) { View view=inflater.inflate(R.layout.container_fish, viewGroup,false); MyHolder holder=new MyHolder(view); …
nikhil lohar
  • 139
  • 3
  • 14
1
vote
0 answers

I am having problems with the listener clicking for the button to view detail

this is the error Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.Button.setOnClickListener(android.view.View$OnClickListener)' on a null object reference I just learned about android, please guide…
1
vote
0 answers

Inconsistent vertical scrolling of a BottomSheetBehavior ViewGroup containing nested RecyclerViews

Abstract Trying something similar to Google Maps layout behaviour Detail I'm trying to implement a BottomSheetBehavior that has a ViewGroup (any) -> ViewPager(Fragments) -> RecyclerView (Vertical) -> Multiple horizontally scrollable RecyclerView /…
1
vote
1 answer

Edittext and textview inside recyclerview Android kotlin scrolling issue

This is the kotlin code where I have a order cart which consists of an ArrayList of elements and what I am trying to do here is that by default there will be quantity set to 1 in the EditText and I have buttons to increment and decrement it. So…
1
vote
1 answer

RecyclerView empty on rotate

I learned from here how to prevent restart on orientation change How to avoid restarting activity when orientation changes on Android Thus I implemented it In my Manifest I make sure rotate doesn't trigger…
1
vote
3 answers

Recycler view crashing when trying to open in Activity

I have an Activity which consists of RecyclerView list. I declared recycler view as below: RecyclerView listTickets = (RecyclerView) findViewById(R.id.recyclerView); LinearLayoutManager layoutManager = new…
1
vote
0 answers

How to give inshort like (staking) animation with Recycler view?

I am using Recycler view with SnapHelper and want animation like in bellow link but every other tutorial achieve this effect with viewpager, how to give this animation with Recycler view? This is what i want to achieve demo animation.
1
vote
4 answers

Wrong behavior when click on item in recyclerView to change its color?

I'm trying to change the background color of the clicked item in RecyclerView from the adapter and it works, but the problem is when I click on position 1 it changes the color of position 1 and 7, and when I click on position 2 it changes the color…
1
vote
1 answer

Android: Horizontal line view in Recyclerview blinking while scrolling

I am facing an issue in my Recyclerview item it contains multi views as horizontal line when scrolling the lines are blinking and i don't know why. this video explain the problem. this is Recyclerviewitem.xml
1
vote
0 answers

How to set minimum vertical scroll range for RecyclerView

Is it possible to make RecyclerView have a minimum vertical scroll distance? (e.g. just render nothing/transparency if not enough items)
AlanSTACK
  • 5,525
  • 3
  • 40
  • 99