I’m doing a recycler method in my android studio project but i have a problem. Everytime i’m trying to findViewById my application is crashing. And i don’t understand why because i’m creating my view in the good way. And i’m trying to continue with that But i’m crashing at …
Tag: android-recyclerview
How to save data from RecyclerView EditText
I have RecyclerView with multiple EditText. I want to save data that user provided to the EditText, store it and retrieve it after opening an app again. I have an app where user tracks how many repetitions of certain exercise they did and obviously I want it to be saved somehow and to be retrieved later, but …
Using If in RecyclerView, doesnt show all the item of the list
I am trying create a RecycleView for my chat application and to align the sent and arrived messages to the left and right. I used an if state to check if that is from me, and 2 separated textview aligned to start/end and only showing the correct one. I think it isn’t the best solution as sometimes after…
My RecyclerView duplicates my items views
So I’m testing the Recycler View and facing some troubles when adding new item. I have a RecyclerView where I try to display a user’s contacts, but when I create a new elemen, all the contacts duplicate. I know that I should clean my view before adding new data, but I’m not sure how to do th…
How do I display child of child’s data from firebase in my RecyclerView?
I want to show data of all children inside all the Categories from the database (added the image below of what my database looks). I am adding data to my RecyclerView using the adapter which needs FirebaseRecyclerOptions object to be passed. I saw one answer where DataSnapshot was used to get child of child d…
How to show Posts by Specific users in a recyclerview using FirebaseUI library (Java Android)
I am using FirebaseUI library for my social app. I was able to retrieve posts by all users into a recyclerview. My goal is to have another option where users can view and edit their own posts. I cant seem to get user specific posts from the database, how do I go about doing this? Also I’m using a recycl…
How to add long click listener on recyclerview adapter?
I already implemented onClick now I want to add onLongClick , I searched non of the solutions matched my case, because my adapter is setup differently Adapter my Fragment Answer You need to add a 2nd method to your interface to represent the long click event. Then, within onBindViewHolder, add vh.itemView.set…
how to handle multiple views in RecyclerView adapter
the problem that I implement a ReyclerView with a custom ItemClickListener inside the adapter: and here is the whole code (for Adapter): so the problem that when I have overridden the ItemClickListener inside the activity to control the views inside the list-item( I will attach the code of the activity and th…
Recycler view inside full screen alert dialog does not showing items
I have a recycler view inside my full screen alert dialog, but for some reason it doesn’t display any of the items inside the ArrayList passed to the adapter. I tried: Initializing the adapter after adding the items inside the ArrayList Use notifyItemInserted instead of using notifyDataSetChanged Checki…
My activity_main.xml is not showing my contacts
In my Android Studio layout file for my MainActivity class, there is a layout that used to show my contacts but it doesn’t work anymore. This is how the layout shows: This is what shows in the emulator (note: I already have added contacts). I’m not sure if it has to do with the layout, the MainAct…