Search in the items of the recyclerView using SearchView. Android | Kotlin

แชร์
ฝัง
  • เผยแพร่เมื่อ 9 พ.ย. 2024

ความคิดเห็น • 20

  • @srisai1200
    @srisai1200 ปีที่แล้ว

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

  • @RandVideo
    @RandVideo ปีที่แล้ว +1

    thanks sir,

    • @MohsenMashkour
      @MohsenMashkour  ปีที่แล้ว

      You're welcome. Sub for more.

    • @RandVideo
      @RandVideo ปีที่แล้ว

      ​@@MohsenMashkourgreat channel for learning kotlin

  • @МухаммадаминСалохиддинов

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

    • @MohsenMashkour
      @MohsenMashkour  ปีที่แล้ว +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.

    • @МухаммадаминСалохиддинов
      @МухаммадаминСалохиддинов ปีที่แล้ว

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

    • @MohsenMashkour
      @MohsenMashkour  ปีที่แล้ว +1

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

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

    • @MohsenMashkour
      @MohsenMashkour  ปีที่แล้ว

      Did you search for the error on the internet?

  • @jitz1545
    @jitz1545 7 หลายเดือนก่อน

    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)

    • @MohsenMashkour
      @MohsenMashkour  ปีที่แล้ว

      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 ปีที่แล้ว

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

    • @MohsenMashkour
      @MohsenMashkour  ปีที่แล้ว

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

    • @sebastianlopez-wh6ht
      @sebastianlopez-wh6ht ปีที่แล้ว

      @@MohsenMashkour dear, nop dont work, my itemArrayList = 0 i dont now why plis help me, i dont found data how i can do that searchview =/

    • @MohsenMashkour
      @MohsenMashkour  ปีที่แล้ว

      I will check again your codes tomorrow.