RecyclerView and CardView in Android

Duration

5 minutes

Tip: If you are doing this exercise live in a session, make sure to make good use of the instructor, they are online to answer any questions you have!

Goals

The goal here is to load a layout manager into your RecyclerView.

Required assets

The provided Resources folder for this part contains a subfolder named Completed with a solution you can use to check your work. Please make sure you have this folder before you begin. This lab is a continuation of the previous one. If you did not complete the previous exercise, you can use the Completed solution from the previous part as starter code for this part.

Steps

Below are the step-by-step instructions to implement the exercise.

Layout manager

  1. Open MainActivity.cs.
  2. Add a LinearLayoutManager to your RecyclerView. Choose a vertical layout.

    Show Code

  3. Compile your app. You do not need to run it since it will not display any output.

Summary

In this exercise, you loaded a LinearLayoutManager into your RecyclerView.

Go Back