‫Welcome back.
‫Now let's handle the click events on the Recycler View items.
‫So when the user clicks on any item in this recycler view, there is a toast message shown displaying
‫the name of the chosen site.
‫For that we need to go to my adapter class and inside the my Viewholder class I need to go to the init
‫block and I need to specify the click listener Itemview set on click listener and I need to use this
‫for toast dot Maketext.
‫And here I need to specify three parameters the item view context.
‫The message itself you choose.
‫Items list and I need to pass the position, the adapter position and I need to get the name, the third
‫parameter, the length, which is those dot short.
‫And don't miss the use the show method.
‫Okay, now let's run our application and here we go.
‫If I click on the fruits you can see this toast message.
‫You choose fruits vegetables, bakery milk and snacks okay so congratulations guys.
‫We succeeded in handling the click events on the recycler view items.