RecyclerView | Everything You Need to Know

Поділитися
Вставка
  • Опубліковано 26 жов 2024

КОМЕНТАРІ • 10

  • @حاتمأمحمد-د6د
    @حاتمأمحمد-د6د Рік тому +2

    Thanks man keep going 👏👌

  • @amaii8933
    @amaii8933 5 місяців тому

    Helped me a lot! Thank you soooo much !

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

    Great Chanel 👍 👌.
    I have a question for you .
    What are you using in the backend of the application 🤔 ?
    Without counting firebase .

    • @PracticalCoding
      @PracticalCoding  Рік тому +2

      I'm not using any backend. Sorry if calling the object a repository was misleading. I intended for the "fakeRepository" object to act as the response from something like firebase. If you take a look at the code, the data is just hard coded.

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

      @@PracticalCoding thank you 🙏

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

    Thank you for this. Question at the 6:20 mark. How can MyAdapter inherit RecyclerView.Adapter if ItemViewHolder has not yet been defined? I may be confused on the order of execution when it comes to OOP. Any feedback would be appreciated!

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

      Hey, sorry for the late reply. It looks like you may have some confusion about the structure of the adapter class. In the adapter class that I showed in the video, the inner class ViewHolder is a static inner class of the outer class MyAdapter. This means that the ViewHolder class is a member of the MyAdapter class, and it can access all of the members of the MyAdapter class, including private members.
      The ViewHolder class is not inherited by the MyAdapter class. Instead, it is a separate class that is used by the MyAdapter class. The MyAdapter class extends the RecyclerView.Adapter class, and it overrides the following methods:
      • onCreateViewHolder: called when the RecyclerView needs a new view to display an item.
      • onBindViewHolder: called by the RecyclerView to bind the data for the given position to the view.
      • getItemCount: returns the number of items in the data set.
      These methods use the ViewHolder class to hold the views for each item in the RecyclerView. The ViewHolder class is responsible for holding the views and binding the data to those views.
      I hope this helps to clarify the relationship between the MyAdapter class and the ViewHolder class. Let me know if you have any more questions.

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

    keep going, man) and more smile like earlier)

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

    Good morning
    Can you explain a complete application in detail and with complete codes to add names to Android using Java and Android Studio..... Thank you very much🙏🌹

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

    capture images with camera and put that images in recyclerview..make video on this