Newest 'android-recyclerview' Questions - Stack Overflow

Questions tagged [android-recyclerview]

The RecyclerView widget is a more advanced and flexible version of ListView and GridView.

0
votes
0answers
11 views

How to choose picture from gallery and display it in CardView when Button inside the same CardView of ReclerView is pressed

I'm creating an app where there's cardviews and in every cardview there is a button "choose picture" and a imageView and some data, I want to make the user get a photo from gallery when button "choose ...
0
votes
0answers
11 views

Error notifyDataSetChanged() in RecyclerView when its scroll to last position

I am using RecyclerView to display the list of rows, each row has a buy button. when the user buys an element, the method notifydatasetchanged() is called and the buy button has to change the ...
0
votes
0answers
10 views

Getting problem in sending data from recyclerView adapter to a new activity

I have read almost all the stackOverflow solution to implement this but even then when i am clicking on a item of recyclerView, then the intent is sending the data of the last item of the screen. I ...
-1
votes
1answer
16 views

How retrieve data below another data inside reyclerview in Firebase

I have a shop app where people can post comments about a product and other people can answer below the first comment. I want to retrieve the comment and its replies into one Recyclerview like ...
0
votes
0answers
23 views

recyclerview is flipping upside down when firebase data changed

i have a recyclerview that is taking data from Firebase the recyclerview had edit text inside it if the data changed in the Firebase its changed in recyclerview normal but if i interact with the edit ...
0
votes
0answers
13 views

How to set RecyclerView Position using Firebase Adapter?

Since a long time i tried to pagination with firebase in recyclerview. And might be this is solution. Here i have method displayAllUserPost(); which run in first onCreate and then run at Bottom of ...
0
votes
0answers
5 views

How to click on a recyclerView which is nested inside other views

This is the attached images of the view hierarchy I have a Recyclerview nested inside other views, Every time I try to find that view with espresso, Espresso is unable to find the view in the view ...
0
votes
2answers
26 views

How to design a recyclerview with each item containing 2 buttons beside an imageview in andorid

I am trying to make a recyclerView where each of the items in the list will show an imageView with 2 buttons on the right of the imageview. I have tried but not really getting there. Some help would ...
0
votes
0answers
7 views

Displaying placeholders in RecyclerView without relying on Paging library

I'm using the Paging library in my app along with Room and Retrofit to page an api. I'm currently using representing the ui state using data classes like so: sealed class State : BaseState { ...
0
votes
0answers
17 views

How to addAll, clear data to recyclerview

I am studying an example with listview in which I want to perform a network request on a background thread. In my app I am using a recyclerview. Android Studio states that it can not resolve methods ....
0
votes
0answers
3 views

android Overlapping items inside StaggeredGridLayoutManager

The items from the recyclerviews are overllaping: here is the recyclerview declaration: recyclerView = (RecyclerView) findViewById(R.id.recyclerView); arrayList = new ArrayList<>(); arrayList....
0
votes
0answers
5 views

set intent, OnCreate in recycler view to go to another specific activity for specific list(row)

I have implemented onClick, and when I clicked to each list all are going to "abc" activity but I want to navigate list having word "dd" into activity "abcActivity" and list having word "ss" to "...
0
votes
1answer
27 views

Cannot retrive values from RecyclerView ,Recyclerview is populated via the SQlite DB

Basically we need to get the email from the recyclerview We tried adding onClickListener on the TextView in the RecyclerView, but when there are more than one entries in the RecyclerView, we cannot ...
0
votes
0answers
20 views

Images on RecyclerView does not updated after Image url changed

I am sending Request on fragment to receive Store Item data from Server which contains urls of images like below public class StoreFragment extends BaseFragment<FragmentStoreBinding, ...
0
votes
3answers
40 views

How can we set onClickListener for each list item(each row) of recycler view, different activity for different object of list

I need to set OnClickListener for each list item of recycler view. I want to navigate to a different activity by clicking each list view item. So far I've managed to pass the click position via a ...
0
votes
0answers
29 views

Implement Asymmetrical Grid Layout Manager Like Instagram Search

I Created a RecyclerView And Set layoutManager Of My Adapter To GridLayout . But I Want GridLayout Like Instagram Search below image, I Want A GridView Like This : Please Help Me . Thanks . i ...
0
votes
1answer
54 views

Android Firebase -Cards not displaying in RecyclerView and NullPointerException

I am trying to build an app where users can post something with image and description which is included individually in CardView in RecyclerView. So I have have got three problems 1.When id(userId) ...
0
votes
0answers
16 views

I want to add Ads in ExoPlayer RecyclerView

I want to add Ads in exoplayerrecyclerview in android studio after 3 exoplayer player videos I don't know how to add it. Playerview.java public FrameLayout mediaContainer; public ImageView ...
1
vote
0answers
29 views

How to get the same detailsActivity

I have an array list. Each word from the list intent the details activity( DetaliiActivity). In the same list i have Blaa word who intent other activity (Blaa Activity) .I want to generate the same ...
0
votes
1answer
13 views

How do I correctly start download from recycler view row?

Recycler view rows contain download buttons then when the user presses it download manager gets called to download the file and get the URI. This works but how do I handle when the user presses back ...
0
votes
0answers
27 views

Recyclerview will not loading entire collection into grid from firebase and Picasso does not load any pictures

i am having 2 issues: My recycler is successfully getting the names of the categories i have in firebase firestore but: 1 it is not loading the entire collection unless i change the span count to ...
0
votes
0answers
46 views

Why is my gallery app (designed using Glide) taking nearly 500mb RAM

I made a gallery app which show offline stored images using GLIDE library in recyclerView but when i view the Profiler in android Studio it shows me that the app is taking nearly 500mb memory. Is this ...
0
votes
1answer
22 views

One item in RecyclerView per day

I would like to create RecyclerView, which will show only one item per 24 hours. For example the first day, recyclerview shows item A, and at the second day shows item B. How can i do it? Thanks in ...
0
votes
1answer
18 views

How to add View pager and recycler view under scroll view layout

I have RecyclerView and ProgressBar under RelativeLayout. ProgressBar shows in center until data loads in RecyclerView. I want to implement ViewPager on top and below it RecyclerView so that whole ...
4
votes
0answers
39 views

How to create Sticky recyclerview in android?

I want to create Sticky recycleview with multiple headers , the header are working perfectly fine but the recyclerview doesn't make them sticky. This is my first time with Sticky recycleview headers . ...
0
votes
3answers
27 views

Recycle View holder on click listener not triggered

I have recyclerview with a listener. I use this code : @Override public void onBindViewHolder(final RecyclerView.ViewHolder holder, final int position) { //just setting the textview etc ...
0
votes
1answer
22 views

Building a sectioned HORIZONTAL recyclerview in android

I want to implement the below design in a recyclerview. I am planning to use a sectioned recyclerview. Can someone suggest the approach I should be taking. What is a better approach for this? Any ...
0
votes
1answer
27 views

How to update live data of the viewModel, when click is performed on recyclerview item

I am new to the Kotlin and I am trying to create an application with MVVM. so what I am trying to do is to make a web call using retrofit in the repository and returning data to the view model and ...
-1
votes
1answer
26 views

how to avoid changing textview color and Imageview color with Scrolling on recyclerview?

I am using recyclerview to implement my list items. In each item row I have a textview and a clock icon. I also have a base time which I compare the time of each recyclerview item with it. if the ...
1
vote
1answer
55 views

Update RecyclerView failed even after updating model success

My application failed to update view after inserting items. I am currently using MVP for building my application. I followed this guide. The author didn't give any further explanations about insert or ...
0
votes
0answers
15 views

Why is activity not started when clicked on RecyclerView item in Espresso/Robolectric android test?

I am writing test in Android Espresso, which should, after click on item in recycler view open item detail(start new activity). Everything works fine on device. If I try to run this test with ...
1
vote
1answer
37 views

How do I implement a method to get and return the LifeCycle [duplicate]

I have issue with the FragmentStateAdapter asking for LifeCycle, kindly help how I can set and pass the LifeCycle in the line of code below. viewPager2.adapter = myViewPagerAdapter(...
0
votes
1answer
24 views

How to inActive or disable onClick of all rows in recyclerview except one row based on a particular condition?

RecyclerView have several row items. Now based on a condition i need to make particular row active and rest to be disable or blur.How can i do this?
-1
votes
0answers
8 views

YouTubePlayerSupportFragment with recyclerview in android

I am trying to play Youtube embedded video inside YouTubePlayerSupportFragment, but if I will take single video id inside fragment its working fine, my problem is how to display in RecyclerView.
0
votes
2answers
52 views

Evenly distribute space between items in RecyclerView

I am trying to put equal space between the items of RecyclerView. For that I am using the below SpanningLinearLayoutManager. What it does is, it will auto distribute space between the items in a ...
0
votes
3answers
50 views

OnClickListener in RecyclerView having image, text

I want to show another activity when object of recycler view is clicked. For eg: if I clicked "dd" text or"image of that line" then I should go to activity named "AbcActivity". It went to many site, ...
0
votes
0answers
38 views

Android set CardView to half RecyclerView height

Setup: I have an Activity which has a BottomNavBar + fragment containing my RecyclerView. The RecyclerView should take all the space above the BottomNavBar. The RecyclerView always dispays 2 ...
0
votes
1answer
17 views

onBindViewHolder() called without payload after notifyItemChanged() with payload

I have notifyDataSetChanged() followed by notifyItemChanged(0, Unit) with payload called for the same adapter, containing, say, 3 items. Each of the calls is made inside view.post(). I expect ...
0
votes
0answers
7 views

Set show less and show more WebView in each item RecyclerView

I have a RecyclerView with each iteam have a WebView and a TextView below webview to show less/show more webview. If my webview have height < 100dp text showless/showmore will GONE and when height ...
0
votes
1answer
14 views

Room database scroll to a particular position using Recycler View

I am using Room data base to fetch the data from the data base. Recyclerview I want to scroll to a particular position in recyclerview. I have already tried list.setNestedScrollingEnabled(true) ...
0
votes
2answers
23 views

How to retrieve child value from firebase?

Here is my problem, I want to show all phone numbers in RecyclerView, how? databaseReference = firebaseDatabase.getReference("CallLog"); //in on data change method using for CallLogList logList = ...
0
votes
0answers
37 views

Set maximum visible items in RecylerView, after that scroll the list

I have a RecyclerView inside a BottomSheetBehavior. In this RecyclerView I have a variable amount of items. (no minimum, no maximum) The problem is, after a certain amount of items (depending on the ...
3
votes
0answers
34 views

Data Loaded To Another Class Automatically By Sliding Between Viewpager Class

I am working on Android Application which Have three Viewpagers In It. The First and Second Viewpager Have The Recycler List in It. The first Viewpager Class contains the Clients Name and I have ...
0
votes
0answers
19 views

Why does my fragment in a tab at the bottom navigation view not show immediately?

Here is the simplified version of my project. Let's say that I have a text view above recycler view which is inside a nested scroll view like the image below Here is the XML of my project: <...
0
votes
1answer
29 views

How to manage multiple instances of mediaplayer?

I have one MediaPlayer for each item in the RecyclerView, each item has is own play/pause button. what I'm trying to do is: When one of the media players is playing and its button is pressed, pause ...
2
votes
0answers
46 views

How to fix onClick behaviour during scrolling a RecyclerView within a Dialog

I am working on a project that requires Dialogs, within which RecyclerViews are used. On all such cases, which are similar, whenever you scroll, before the listener is be able to catch another event, ...
-2
votes
1answer
43 views

Get Negative Position in RecyclerView

Why sometimes negative number Returns the position in RecyclerView ? for get position : holder.getAdapterPosition()
1
vote
0answers
54 views

Recyclerview - Notifydatachange() does not work

I have a tabbed activty with 4 tabs. Each tab has fragment and fragmentlayout has Recycler View with RelativeLayout. The first time data is read from DB , recycler view displays the data. When the ...
2
votes
0answers
48 views

How to make recyclerview layout views according to their count, horizontally and vertically?

I am trying to make recyclerview react to the count of items and lay them out, in a different way occurding to the items count I looked into flexbox-layout but I couldn't achieve what I wanted ...
0
votes
2answers
56 views

How to auto fit recyclerview items to the width of screen android?

I am trying to implement below layout. I want to position the items in such a way that it takes full width of the screen: Expected Layout: Actual Layout: This is the code for item of my ...