RecyclerView Example Spr21

Sample Project to show off how to build a scrolling with using RecyclerView & Adapters

RecyclerView:

  1. Added the RecyclerView to the activity layout:
    activity_main.xml

  2. Created a view for each list item:
    item_person

  3. Created the adapter to load the data into each list item:
    PeopleAdater.kt

  4. Here is where we set the adapter to the RecyclerView:
    MainActivity.kt

Additional Kotlin Code with examples of creating classes with properties, setters and getters

KotlinClassExample.kt

Want to play with the code yourself?

If you wanna run the app yourself, Clone the project, then go to android studio and open an existing project and select the root of this project in which is cloned too.