Questions tagged android-recyclerview

Explore the latest questions and answers asked by our top developers.

Last item in RecyclerView update position issue when using onSearch

When searching items, I use onQueryTextChange to update RecycleView adapter in order to show search results immediately. Sometimes the application fails when click on last item that stays in the adapter. It fails with out of index exception and for some reason tries to call to any index other than zero (but there is only […]

By Ilya
Published
Categorized as android, android-recyclerview, kotlin

I would like to change the value of two integer fields in sqlite db with button click

I am an android beginner and i am preparing for a university exam, only i have some difficulties with sqlite and the recyclerview. I would like to change the value of Integer fields using two buttons, when clicked the "EFFETTUATA" or "DISDETTA" field value becomes 1 instead of 0. I have tried everything. This is […]

By Diego Fedele
Published
Categorized as android, android-recyclerview, android-studio, sqlite

send data back from secondActivity and update is giving me void android.widget.TextView.setText(java.lang.CharSequence) on a null object reference

hello I am making note app I have tried other answers to questions like this and it didn’t work for me. also I have tried Registering a callback for an Activity Result it was two complicated I didn’t get it. when I add item to the recyclerview but when i click that added item it […]

By mohamet amin
Published
Categorized as android, android-recyclerview, android-studio, kotlin

RecyclerView displaying only first index of three

i have a weird problem, I am trying to create a simple app, but i got stuck with recycleview and displaying items. My problem is that i get only one text from the total three. getItemCount() says that i have 3 items … so i don’t know why i get display of only 1 instead […]

By Marius Nicolae
Published
Categorized as android, android-recyclerview, java

Retrieve data from Realtime Database in fragment recyclerview

When I send data to realtime database. it generates 1…5…… numbers as ID with this code: private fun newpost() { var id = 1 buttonPost.setOnClickListener() { dataa.child(auth.currentUser?.uid!!).get().addOnSuccessListener { if (it.exists()) { val imageUrl = it.child("photoUrl").value val postText = editTextNewPost.text.toString() if (postText.isNotEmpty()) { data.child(id.toString()).child("title").setValue(postText) data.child(id.toString()).child("imageUrl").setValue(imageUrl.toString()) editTextNewPost.setText("") id += 1 Toast.makeText(activity, "Post Added", Toast.LENGTH_LONG).show() } } } […]

Kotlin RecyclerView MVVM data not showing

I have a RecyclerView in MVVM project. I have to get text from editText (searchWordEt) and then pass it to the function that invokes API method in viewmodel.API works fine and returns data. But when I invoke searchDefAdapter.submitList(response) in SearchFragment nothing happens and RecyclerView data not showing. class SearchDefAdapter( private var infoListener: OnItemClickListener, private var […]

By apomytkina
Published
Categorized as android, android-recyclerview, binding, kotlin

send data back from secondActivity and update the Recyclerview TextView in android using kotlin

I have tried other answers to questions like this and it didn’t work for me. also I have tried Registering a callback for an Activity Result it was two complicated I didn’t get it also. that is why I am back with startActivityForResult(). so when I add a note and then click it goes to […]

By mohamet amin
Published
Categorized as android, android-recyclerview, kotlin

Xamarin. Adding a RecyclerView into Segment Control

I am trying to learn Xamarin and I really like it, learned about recyclerview and segement control and I was wondering if there is a way to linke them up so that one of my example 2 segments has a recycler in it. For reference I was using there 2 link: How to add content […]

By Josip Juros
Published
Categorized as android, android-recyclerview, uisegmentedcontrol, xamarin

my app crashes "sometimes" when i press delete button

so im building to do list application for studying purpose and so far i’ve made recyclerview, adding new item. i’m now trying to implement multi select for recyclerview items selecting and deleting them after selecting multiple of them. items are saved in room db. im using selection tracker library to get selected recyclerview items IDs, […]

how to use Spinner in Recyclerview using firebase database?

i got the Product data from firebase database and bind it into recyclerAdapter i have a model class named Product, i want to add a spinner in my Recyclerview both of them should get data from firebase database, please help This is my ‘RecyclerviewAdapter’ i want to add a ‘Spinner’ in it which gets all […]

By Gurdeep Singh
Published
Categorized as android, android-recyclerview, database, firebase, spinner
1 2 3 561

Still Have Questions?


Our dedicated development team is here for you!

We can help you find answers to your question for as low as 5$.

Contact Us
faq