Search in the items of the recyclerView using SearchView. Android | Kotlin
Вставка
- Опубліковано 25 лип 2024
- here I will tell you how to be an android developer by building simple Android apps on Android Studio, using the Kotlin language.
In this video, I will show you how to Search for the items in the recyclerView using SearchView and the function setOnQueryTextListener.
If you like the content, buy me a coffee by clicking on this link. ☕☕☕
www.buymeacoffee.com/mkrdevel...
You can find the source codes of this video here:
github.com/MohsenMashkour/Nes...
Related videos(everything about the recyclerview):
• everything about recyc...
Previous videos of the course:
• Android Beginner Cours...
---------------------------------------------------
Timestamps:
00:10 Introduction
01:19 Layout design
04:24 Coding
11:06 New function in the adapter
13:07 Testing the App
13:53 Ending
---------------------------------------------------
Join me on social media:
MkrDeveloper website:
www.mkrdeveloper.com/.
MkrDeveloper Instagram page:
/ mkr.developer
MkrDeveloper Telegram Chanel:
t.me/Mkr_Developer
MkrDeveloper Discord server:
/ discord
.
.
.
.
#Android
#kotlin
#android_studio
#kotlin_course
#android_tutorial_beginners
#android_developers
#recyclerview
#اندروید
#برنامه_نویسی_اندروید
#کاتلین - Наука та технологія
thanks, sir, i hope these types of videos will come
Sure 👍
thanks sir,
You're welcome. Sub for more.
@@mkrdevelopergreat channel for learning kotlin
Mohsen, i have an xml with the same searchview and recyclerview but also a floating (add) button. When I added the searchview I got a 'Render problem' error on my xml. Do you know what causes that?
Did you search for the error on the internet?
@mkrdeveloper hi, i've watch your tutorial do similar like your code. but in my case data coming from api and setted to rcview inside adapter and i want to search only from title object setted to rcView, how i can implement this? i saw your code "setData()" you manually add them to list than searching! i can't do like this. so what you suggest to do?
It very depends on the api that you are using. Most of the Apis have sub branches and for searching and filtering you can pass a new query and ask the api to send you specific data. But if you want to filter the received data the way i showed in the video is enough.
@@mkrdeveloper I'm using nyt(new york times) developers api, what you suggest to do ? Or how i can get only titles from rcView and set them all to one arraylist?
I never used it. But i will take a look at it later when I have time.
Will it work for searching datas thats in firebase ??
It should work
hello dear, i need help to implement the searchView in a mutableList, whit Retrofit and RecyclerView, i try to see you in the video but, you have a ListOf static and i dont understand. if you can help me i appreciate you, thx (My english is not very good)
hello. I checked one of my projects that I used this way with the retrofit and it works good. I don't know what is your problem exactly?
if you want you can check this link and see that project.
github.com/MohsenMashkour/FoodAppAlpha/blob/master/app/src/main/java/com/mkrdeveloper/foodappalpha/MainActivity.kt
@@mkrdeveloper github.com/SirasP/SearchView can you helpme plis, How do i have to do it
I checked the codes that you have. I think you can use array list and it works.
@@mkrdeveloper dear, nop dont work, my itemArrayList = 0 i dont now why plis help me, i dont found data how i can do that searchview =/
I will check again your codes tomorrow.