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
    #اندروید
    #برنامه_نویسی_اندروید
    #کاتلین
  • Наука та технологія

КОМЕНТАРІ • 20

  • @srisai1200
    @srisai1200 Рік тому

    thanks, sir, i hope these types of videos will come

  • @RandVideo
    @RandVideo Рік тому +1

    thanks sir,

    • @mkrdeveloper
      @mkrdeveloper  Рік тому

      You're welcome. Sub for more.

    • @RandVideo
      @RandVideo Рік тому

      ​@@mkrdevelopergreat channel for learning kotlin

  • @paulatriep9279
    @paulatriep9279 Рік тому

    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?

    • @mkrdeveloper
      @mkrdeveloper  Рік тому

      Did you search for the error on the internet?

  • @user-sw1ew3jx5f
    @user-sw1ew3jx5f Рік тому

    @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?

    • @mkrdeveloper
      @mkrdeveloper  Рік тому +1

      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.

    • @user-sw1ew3jx5f
      @user-sw1ew3jx5f Рік тому

      @@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?

    • @mkrdeveloper
      @mkrdeveloper  Рік тому +1

      I never used it. But i will take a look at it later when I have time.

  • @jitz1545
    @jitz1545 3 місяці тому

    Will it work for searching datas thats in firebase ??

  • @sebastianlopez-wh6ht
    @sebastianlopez-wh6ht Рік тому

    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)

    • @mkrdeveloper
      @mkrdeveloper  Рік тому

      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

    • @sebastianlopez-wh6ht
      @sebastianlopez-wh6ht Рік тому

      @@mkrdeveloper github.com/SirasP/SearchView can you helpme plis, How do i have to do it

    • @mkrdeveloper
      @mkrdeveloper  Рік тому

      I checked the codes that you have. I think you can use array list and it works.

    • @sebastianlopez-wh6ht
      @sebastianlopez-wh6ht Рік тому

      @@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 =/

    • @mkrdeveloper
      @mkrdeveloper  Рік тому

      I will check again your codes tomorrow.