Questions tagged [recycler-adapter]

A RecyclerAdapter binds model data with recycling views.

0
votes
2answers
18 views

Optimal way to declare an adapter for a RecyclerView

I have a recyclerView (id = myList) running but I have a question about what is the correct and optimal way to declare an RecyclerView: val myRecycler = findViewById<RecyclerView>(R.id.myList) ...
0
votes
2answers
35 views

How to display Message on latest item in Recyclerview?

I want display badge in latest item on recyclerview and after clicking on it, its visibility is gone. Please help me My code is here: public void onBindViewHolder(ViewHolder Viewholder, int ...
0
votes
0answers
21 views

How to update SQL cursor in RecyclerView in the best way

I have cursor: Cursor inside my MainActivity. I parse the cursor to my recycler view class class RecyclerViewOfLists(var cursor: Cursor, val context: Context): RecyclerView.Adapter<...
0
votes
0answers
32 views

How to access layouts which are not calculated or not present on the display in android

On initial load of RecyclerView few layout or not laid because they are out of the screen , need a solution to access those views. findViewHolderForAdapterPosition is returning null because those ...
0
votes
0answers
14 views

RecyclerView is not setting the view after search

I am trying to use search filter on title in videos recyclerview but when I try to search any title it hide all the content of that recyclerview then I have to go back to previous activity and come ...
1
vote
5answers
80 views

Android RecyclerView how to change first item it's text color

I'm using a Adapter and RecyclerView. I try to change the color of the first item in my RecyclerView. I do this in my onBindViewHolder and the first one indeed changes how i want it to but if i check ...
0
votes
0answers
15 views

Compare 2 List<Replies> to a third list List<Comments> inside RecyclerViewHolder

e.g I have a list of 10 comments List mComments, and a list of 10 replies List mReplies I am sending these Lists to a recyclerview which contains a second recyclerview on its layout, the second ...
0
votes
0answers
30 views

Kotlin - Play Audio with Seekbar in Recyclerview Android

I am using the Recyclerview to show the list of audio-files. In each list-item I have used Seekbar to sync it with playing-status of the audio-file. Now, the problem is when I tap on the play icon ...
0
votes
0answers
32 views

focus is not shifting to next edittext automatically?

I am trying to add and remove edittext through RecyclerView Adapter and it's working fine but I also want to shift the focus to next empty edittext when I click on adapter item which fills the edit ...
0
votes
0answers
6 views

Can I use switch statement inside recycler view adapter to use it for different views and data?

I am trying to display list of similar items in a recycler view in android. I have many different items. Can I use switch statements to use the same adapter class for different item views. If not than ...
2
votes
1answer
35 views

ItemDecoration - How to create vertical dividers?

I'm trying to create multiple vertical dividers for each ViewHolder in recyclerView but can't figure out how. Heres my code for working horizontal dividers: @Override public void onDrawOver(@NonNull ...
0
votes
1answer
45 views

How to integrate dialogflow in android apps

I want to integrate my chatbot(created by dialogflow) to my apps and I have create the xml files but I didn't find a way how to match between them. I have already database using room library ...
0
votes
0answers
24 views

How to fix a frozen activity due to a thread inside a recycler adapter?

I have created an activity where there is a recycler view that is supposed to show the last games played. It loads the data but when i want to go back to the previous activity the app freezes. For ...
0
votes
0answers
17 views

When does the page gain focus

I have an App with a few pages. I'm using a page adapter and I want to start an animation as soon as the page is in focus. I'm using left and right swipe to change between pages. Is there a method ...
0
votes
2answers
19 views

on bind view holder does not run in adapter

I have a strange problem. I want to show some products in a RecyclerView. I pass a list to the adapter to show. In the constructor of the adapter, the list is set, but no other method is called. While ...
0
votes
1answer
31 views

Showing empty state when filtered results are 0 in recycler view

I got this searchView which I use to filter recyclerView. So when there is no results for some search query, I want to show textView to user by setting its visibility to VISIBLE. So in searchView ...
0
votes
1answer
12 views

RecyclerView.Adapter onCreateViewHolder() is called after notifyDataSetChanged()

I use a RecyclerView which work well so far. There are 5 Items visible on the screen, I have 7 ViewHolder which is OK. If I scrolling up and down the number of instances of my ViewHolder is ...
0
votes
1answer
29 views

Nested recycler view's unable to show two independent lists

I have a vertical chat recycler-view i am trying to show multiple horizontal recycler-view's in which contain a "carousel" of card views. I am able to inflate the horizontal views but when i try to ...
0
votes
0answers
14 views

How to modify two arraylist in onQueryTextChange?

I'm trying to create filter to my 2 arraylists. It will be easier to draw everything together below: This is how my arraylists looks like: [1] Names: 1: McDonals 2: KFC 3: H&M 4: Harrods 5: ...
0
votes
0answers
19 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
1answer
49 views

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

After doing many hit and try method and observing other stackoverflow code, I was able to send data to next activity. I want to know: Is it safe to call cursor.moveToPosition twice in onBindViewHolder ...
-3
votes
1answer
20 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
36 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
15 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
14 views

Unable to update recyclerview in adjacent fragment of viewpager

I have a viewpager containing 2 fragments. Each of these fragment contains a recyclerview with an adapter that retrieves data from the same SQLite database. The recyclerview in the first fragment ...
4
votes
0answers
68 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 . ...
-1
votes
2answers
41 views

Recycler didnt show my images :- E/RecyclerView: No adapter attached; skipping layout

I am building app for upload pictures with name on it to the firebase and then retrieve it in recycler view along with text , I have succeeded in upload the picture , sadly, I cannot view it in the ...
1
vote
0answers
27 views

The adapter items just disappear

Video Preview : The views of recycler sometimes disappear from nowhere and sometimes not. Could someone explain to me why this is happening? postAdapter = new PostAdapter(getActivity(), ...
0
votes
0answers
19 views

How to prevent drawables from refreshing on recyclerview?

I made a button, which when clicked changes values on the database, the status/color of the button is based on the value on the database. How to prevent all drawables from getting refreshed on ...
3
votes
2answers
33 views

Multiple Headers in recycleview not working - why so?

I want to create recycleview with multiple headers , the first header is working perfectly fine but the rest of the headers are not working as expected. This is my first time with recycleview headers ....
0
votes
0answers
18 views

Updating a drawable updates all drawables on all devices that are online

I have a like button where when someone clicks on it, its drawable change. The problem is that it also update all the drawables from all devices plus adds a trembling effect. Can someone please help ...
0
votes
1answer
28 views

Recycler adapter is not showing data

I am using Firebase to create an app where users can sign up for a class and then view them. I am using the same recycler adapter and objects for the activities that show the classes and the activity ...
0
votes
1answer
32 views

recyclerview showing empty white screen

I am new kotlin and recently started working with retrofit and I have followed this tutorial http://velmm.com/kotlin-retrofit-android-example-with-recyclerview/ but when I run code it is showing ...
0
votes
1answer
25 views

How to delete item under View_Type header in RecyclerView when using SectionedGridRecyclerViewAdapter

I have a list of videos which is shown under header like Today,Yesterday etc. If user selects any one video it should delete that. Currently I am able to achieve deleting functionality, but the ...
1
vote
1answer
67 views

Recyclerview takes more width than parent width

I don't know why the RecyclerView takes more width than the parent width even if I set the width in the xml to match_parent. I don't think there is anything wrong with the xml but I am not sure with ...
0
votes
0answers
38 views

How to stop item trembling on recyclerview?

I have implemented a notification center using a recyclerview displayed on a fragment , when I click on the item it writes a value on the database and then base of the condition the green ...
1
vote
1answer
39 views

How to achieve Multiple View Type in recylerview for multiple model class with single adapter?

I'm developing a e-commerce application for a start-up, to display the products enlisted in respective categories i have used Recycler view. For single variant products the template which i customized ...
0
votes
2answers
22 views

How to load the clicked URL from a RecyclerView adapter in a WebView

Some images, names, and URLs are being displayed as RecyclerView items in the app MainActivity //... protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); ...
0
votes
1answer
41 views

How to get the data of a recycler item in a recycler adapter from firebase onClick?

I have an app that displays Cardviews in a recycler adapter. Each cardview gets its data from Firebase. My app shows classes a user can sign up for and I want the user to be able to click on the ...
0
votes
1answer
29 views

Can not import Adapter

Im learning Kotlin and Mvvm for Android. I am using a recycler view, and when i try to set the adapter i cant import the Adapter class, I dont know if the problem is in the code because Android Studio ...
1
vote
1answer
39 views

How to make Circular recyclerview (layout with scroll) in Android?

I am trying to create the similar CircularLayout (RecyclerView) in android as it shows in the Image. Can somebody help me to implement it? I have tried many ways to do it, but no success. https://...
0
votes
3answers
32 views

Is SwipeRefreshLayout compatible with an adapter that has multiple viewType?

I am making a list, that will get more items when I go to the bottom of the list. I want this list to be refreshable too, so I need a SwipeRefreshLayout. Let's say I have an adapter like this : ...
0
votes
1answer
16 views

How to pass data to BottomSheetDialogFragment?

I have a BottomSheetDialogFragment class. Looks like this: public class BottomSheetAddProp extends BottomSheetDialogFragment It has a method: @Override public View onCreateView In this method I ...
1
vote
0answers
44 views

Recycler view in a Fragment is showing up in emulator and some real time devices but not showing up in some real time devices

I am having a recycler view in one my fragment. The recycler view is showing up with the items in emulator and some real time devices but it is not showing up in some real time devices. I have kept ...
0
votes
0answers
14 views

Logcat is showing Parcelabe value not null but calling LayoutManager#onRestoreInstanceState is not redirecting to saved state

saving RecyclerView state at onPause() in GroceryFragment : @Override public void onPause() { super.onPause(); Log.d(TAG, "onPause: called"); FragmentStateListener fragmentStateListener = ...
0
votes
2answers
77 views

How to to hide josn object in recyclerview based on condition?

I Have one json array in array list i need show one object as count and one as text view, while going to filter the object i'm not able to find count view and display view, i search for hash map but ...
0
votes
1answer
16 views

How to fix, checkbox not checked using code in custom adapter for a spinner?

I am setting up a custom spinner with "Text & Checkbox" using custom adapter. How can i set checked some of the checkbox that already selected by user? while clicking on the checkbox values shows ...
0
votes
0answers
23 views

How to refresh the animated same view again in adapter android

On item click, adapter should refresh and onCreateViewHolder and onBindViewHolder should be called again so the data and animation should be refreshed. i want to animate recyclerview from right to ...
0
votes
0answers
12 views

How to insert retrieved ondatachange hashmap Values into firebaseRecyclerView Adapter?

I want to insert ondatachange datasnapshot getValue into firebase RecyclerView Adapter This is my filtered datasnapshot values mDatabase = FirebaseDatabase.getInstance().getReference(); ...
0
votes
0answers
22 views

Recyclerview shows exception in second time while store image in imageview

I am having problem with recycler view. I have a recycler view containing an image and two text views.There are four items inside the recyclerview. First when the app starts there is a default image ...