Creating your movie list
One of the goals of our Packtflix app is for users to have the freedom to explore and enjoy an extensive range of movies (or TV series), ensuring they stay engaged with our app. To achieve this, we must present our movie catalog in the most appealing manner possible. For that reason, in this section, we will focus on building a movie (or series!) catalog screen.
To start building the classical main screen of our streaming app, we first need to create the models we will use to represent the information.
Building the models
Start by building the Movie
model:
data class Movie( val id: Int, val title: String, val imageUrl: String, )
This is the model that will represent a movie – it includes the movie identification (id
), its title, and a URL to an image of the movie.
Generally, movies in a streaming app are arranged by genres, so let’s create a Genre
model too...