RecyclerView With Item Click Listener in Kotlin : ( Android Tutorial 2022 )

Поділитися
Вставка
  • Опубліковано 11 січ 2025

КОМЕНТАРІ •

  • @georget10i
    @georget10i Рік тому +4

    Thank you! I think this is the cleanest solution I've found so far. You can implement a listener using an Interface, but this, in my opinion, is a cleaner solution. I am guessing this tutorial is aimed at somebody who is already familiar with Kotlin, hence why some parts are not explained. But if like myself, you are new to Kotlin, what he does at 12:30 is he declares a "function type" that takes an object of type food, and returns Unit (which is an equivalent of void in Java) and then he makes this function type nullable (hence the parentheses) and then initializes it to null. If you are coming from the C# world, it's basically an Action Delegate. I found that part confusing in the tutorial, so if you are in the same situation, I hope this explanation helps. Thanks again for the tutorial, CodingSTUFF!

  • @chanliol6626
    @chanliol6626 2 роки тому +10

    You are a savior. For days I've been trying several ways to move through my nav graph (fragments) using recyclerview clicklisteners and you just showed me the solution. Thanks a ton buddy. Awesome work.

  • @زيد_اليماني
    @زيد_اليماني Рік тому

    I watched many video tutorials and all of them didn't work for me and they looked very complicated, unlike your video it's very easy to implement and works without problems really you are amazing

  • @sisoMK
    @sisoMK Рік тому +3

    It works, just did it using fragments instead of activity because im using a navegation bottom bar. Works fine for me !

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

      can you tell me how you did it please?

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

    hello sir
    Explanation was great...i've searching whole youtube for like this video who could explain the concepts with simple constraints and with good explanation..
    Thank you so much sir

  • @enlost3052
    @enlost3052 2 роки тому +2

    It really helped me learn a lot. Simple and very beginner friendly .

  • @Mohit-il9gx
    @Mohit-il9gx 2 роки тому +3

    😶no words just "Thanks 🇮🇳 UA-camrs"

  • @SajjadAli-hh9gq
    @SajjadAli-hh9gq 2 роки тому

    Excellent Work Sir

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

    thanks, very useful!! , new subscriber

  • @sisoMK
    @sisoMK 2 роки тому

    THANK YOU VER WELL DONE VIDEO, EASY TO FOLLOW

  • @rinorobot
    @rinorobot 2 роки тому

    great video, and very useful the clicklister with parcelable

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

    çoook yardımcı oldu çok teşekkür ederim

  • @mertcankartal4453
    @mertcankartal4453 2 роки тому

    useful and clean explain thx dude

  • @lglf77
    @lglf77 10 місяців тому +2

    your code is deprecated in news glades

  • @rodelioliwag7627
    @rodelioliwag7627 2 роки тому

    Thank you very much. Very helpful

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

    it worked thanks a lot!

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

    very useful , thank you

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

    Nice work bro, u help me!

  • @did..you..know.
    @did..you..know. 2 роки тому +2

    Bro, why in main activity i cannot find onItemClick? Its just not there I cannot use it

  • @NoeliaRedondo-bx5fm
    @NoeliaRedondo-bx5fm 2 роки тому

    Muchísimas gracias. Salvaste mi vida

  • @Elmdrassa2
    @Elmdrassa2 2 роки тому

    thanks bro , thats info what i search

  • @tofushiro3871
    @tofushiro3871 Місяць тому

    Hello sir. I would like to ask how I should change the codes at the line
    if (food != null) {....}
    since my 2nd activity contains only fragment container view and no image nor text?

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

    sir ads integration in recyclerview par video banaiye pls, and then reward and banner ads, pls

  • @mertcantopcu1351
    @mertcantopcu1351 2 роки тому

    i just want to When we click on an text or button in the detailedactivity section, I want it to go to a url page, how can I do it?

  • @gianlim3610
    @gianlim3610 9 місяців тому

    Thank you sir!

  • @kohlishiva2135
    @kohlishiva2135 2 роки тому

    Thanx a lot bhaaai

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

    get parcelable extra is deprecated . Now what i can do??!! pls help sir

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

      Did you find an answer? Looks like there is an alternative version that has just a slightly different signature.

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

      dont mind it, it works fine even if its deprecated

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

      @@mattdyor2040 it works even with the deprecated

  • @Vtx-ex2bf
    @Vtx-ex2bf Рік тому

    Do you have same type of video in java?

  • @vizliu
    @vizliu 2 роки тому

    Is it possible to make part of the text that we add to the list bold

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

    bro can you please tell me what theme of android studio are you using and what emulator are you using ?

  • @wilwad
    @wilwad 2 роки тому

    Thank you 🙏

  • @JosephVillariasa
    @JosephVillariasa 8 місяців тому

    Whats the version of android studio of this sir?

  • @Kw710v
    @Kw710v 2 роки тому

    how can i pass data between 2 recyclerview with firebase no one made video about this issue can you make video about this. If you dont want to make video about this issue can you tell me how can i pass data between 2 recyclerview with firebase

  • @desihiphop4998
    @desihiphop4998 2 роки тому

    what if i want different action on clicking the image of food and different action on clicking a whole view ???

    • @kundangupta1333
      @kundangupta1333 2 роки тому

      Same question 🙋 please help

    • @codingstuff070
      @codingstuff070  2 роки тому

      Add different click listeners one on imageview and one on whole itemview

    • @kundangupta1333
      @kundangupta1333 2 роки тому

      @@codingstuff070 okay,thank you sir

    • @desihiphop4998
      @desihiphop4998 2 роки тому

      @@kundangupta1333 you got how to do that ?

    • @kundangupta1333
      @kundangupta1333 2 роки тому +1

      @@desihiphop4998 yes,in place of itemview.setonCliclister just put imageid.setonclicklister {},I think this way we can implement

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

    'getParcelableExtra(String!): T?' is deprecated. Deprecated in Java 😢😢😢😢😢😢

  • @shakymountain8834
    @shakymountain8834 3 місяці тому +1

    Thankyou so so much !

  • @pgameboy8
    @pgameboy8 2 роки тому

    exelente parabéns!!!!!!!!

  • @АльфредАхметгалеев

    super

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

    Show me your manifest, please!

  • @vizliu
    @vizliu 2 роки тому

    thank bro

  • @shaktisinghsonigara9094
    @shaktisinghsonigara9094 2 роки тому

    pls can you share source code.

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

    I just wish there was a github link