🚧 add some requests

Get the most popular movie
Get the top rated movie
Get the upcoming movie
Get the movie now playing
features/api/requests/2
Jordan ARTZET 2 years ago
parent 5a6b157c4f
commit fc371bf386

@ -11,14 +11,25 @@ import retrofit2.http.Query
interface MovieApplicationAPI {
// Movie
@GET("movie/popular")
fun getPopularMovies(@Query("api_key") apiKey : String = API_KEY, @Query("page") page : Int = 1) : Call<PopularDTO>
@GET("movie/top_rated")
fun getTopRatedMovies(@Query("api_key") apiKey: String = API_KEY) : Call<PopularDTO>
@GET("movie/now_playing")
fun getNowPlayingMovies(@Query("api_key") apiKey : String = API_KEY, @Query("page") page : Int = 1) : Call<PopularDTO>
@GET("movie/upcoming")
fun getUpcomingMovies(@Query("api_key") apiKey: String = API_KEY) : Call<PopularDTO>
fun getUpcomingMovies(@Query("api_key") apiKey: String = API_KEY, @Query("page") page : Int = 1) : Call<PopularDTO>
@GET("movie/top_rated")
fun getTopRatedMovies(@Query("api_key") apiKey: String = API_KEY, @Query("page") page : Int = 1) : Call<PopularDTO>
// TvShow
@GET
fun getPopularTvShow(@Query("api_key") apiKey : String = API_KEY, @Query("page") page : Int = 1) : Call<PopularDTO>
@GET("trending/{media_type}/{time_window}")
fun getTrending(@Path("media_type") mediaType : String = "all", @Path("time_window") timeWindow : String = "day", @Query("api_key") apiKey: String = API_KEY ) : Call<PopularDTO>

@ -36,7 +36,7 @@ data class MediaResultDTO(
@Json(name = "original_name")
val originalName : String?,
@Json(name = "media_type")
val mediaType : String
val mediaType : String?
) {
}

@ -19,6 +19,6 @@ data class MediaResult(
val voteAverage: Double,
val name: String? = null,
val originalName: String? = null,
val mediaType : String
val mediaType: String?
)
{}

@ -0,0 +1,36 @@
package fr.iut.pm.movieapplication.repository
import android.util.Log
import fr.iut.pm.movieapplication.api.RetrofitInstance
import fr.iut.pm.movieapplication.api.dtos.PopularDTO
import fr.iut.pm.movieapplication.model.media.MediaResult
import fr.iut.pm.movieapplication.utils.MediaResultMapper
import retrofit2.Call
import retrofit2.Callback
import retrofit2.Response
class MediaRepository {
fun getTrends(callback: (List<MediaResult>) -> Unit) {
val listMovie : MutableList<MediaResult> = mutableListOf()
RetrofitInstance.api.getTrending().enqueue(object : Callback<PopularDTO> {
override fun onResponse(call: Call<PopularDTO>, response: Response<PopularDTO>) {
if(response.isSuccessful) {
Log.d("Response",response.body().toString())
val popularDTO = response.body()
popularDTO?.results?.forEach {
val movie = MediaResultMapper.mapToMediaResult(it)
listMovie.add(movie)
movie.title?.let { it1 -> Log.d("Movie", it1) }
}
}
callback(listMovie)
}
override fun onFailure(call: Call<PopularDTO>, t: Throwable) {
Log.d("Error failure", t.printStackTrace().toString())
}
})
}
}

@ -41,26 +41,92 @@ class MovieRepository() {
})
}
fun getTrends(callback: (List<MediaResult>) -> Unit) {
val listMovie : MutableList<MediaResult> = mutableListOf()
fun getNowPlayingMovies(page : Int = 1, callback: (List<Movie>) -> Unit) {
RetrofitInstance.api.getTrending().enqueue(object : Callback<PopularDTO> {
val listMovie : MutableList<Movie> = mutableListOf()
RetrofitInstance.api.getNowPlayingMovies(page = page).enqueue(object :
Callback<PopularDTO> {
override fun onResponse(call: Call<PopularDTO>, response: Response<PopularDTO>) {
if (response.isSuccessful) {
Log.d("List :", response.body().toString())
val popularDTO = response.body()
val listMoviesDTO = popularDTO?.results
listMoviesDTO?.forEach {
val movie = MediaResultMapper.mapToMovie(it)
listMovie.add(movie)
Log.d("Movie ", movie.title!! )
}
}
callback(listMovie)
}
override fun onFailure(call: Call<PopularDTO>, t: Throwable) {
Log.d("Error failure", t.message.toString())
}
})
}
fun getUpcomingMovies(page : Int = 1, callback: (List<Movie>) -> Unit) {
val listMovie : MutableList<Movie> = mutableListOf()
RetrofitInstance.api.getUpcomingMovies(page = page).enqueue(object :
Callback<PopularDTO> {
override fun onResponse(call: Call<PopularDTO>, response: Response<PopularDTO>) {
if (response.isSuccessful) {
Log.d("List :", response.body().toString())
val popularDTO = response.body()
val listMoviesDTO = popularDTO?.results
listMoviesDTO?.forEach {
val movie = MediaResultMapper.mapToMovie(it)
listMovie.add(movie)
Log.d("Movie ", movie.title!! )
}
}
callback(listMovie)
}
override fun onFailure(call: Call<PopularDTO>, t: Throwable) {
Log.d("Error failure", t.message.toString())
}
})
}
fun getTopRatedMovies(page : Int = 1, callback: (List<Movie>) -> Unit) {
val listMovie : MutableList<Movie> = mutableListOf()
RetrofitInstance.api.getTopRatedMovies(page = page).enqueue(object :
Callback<PopularDTO> {
override fun onResponse(call: Call<PopularDTO>, response: Response<PopularDTO>) {
if (response.isSuccessful) {
Log.d("Response",response.body().toString())
Log.d("List :", response.body().toString())
val popularDTO = response.body()
popularDTO?.results?.forEach {
val movie = MediaResultMapper.mapToMediaResult(it)
val listMoviesDTO = popularDTO?.results
listMoviesDTO?.forEach {
val movie = MediaResultMapper.mapToMovie(it)
listMovie.add(movie)
movie.title?.let { it1 -> Log.d("Movie", it1) }
Log.d("Movie ", movie.title!! )
}
}
callback(listMovie)
}
override fun onFailure(call: Call<PopularDTO>, t: Throwable) {
Log.d("Error failure", t.printStackTrace().toString())
Log.d("Error failure", t.message.toString())
}
})
}
}

@ -1,4 +1,43 @@
package fr.iut.pm.movieapplication.repository
import android.util.Log
import fr.iut.pm.movieapplication.api.RetrofitInstance
import fr.iut.pm.movieapplication.api.dtos.PopularDTO
import fr.iut.pm.movieapplication.model.media.movie.Movie
import fr.iut.pm.movieapplication.model.media.tvshow.TvShow
import fr.iut.pm.movieapplication.utils.MediaResultMapper
import retrofit2.Call
import retrofit2.Callback
import retrofit2.Response
class TVShowRepository {
fun getPopularTvShow(page : Int = 1 ,callback: (List<TvShow>) -> Unit ) {
val listMovie : MutableList<TvShow> = mutableListOf()
RetrofitInstance.api.getPopularMovies(page = page).enqueue(object :
Callback<PopularDTO> {
override fun onResponse(call: Call<PopularDTO>, response: Response<PopularDTO>) {
if (response.isSuccessful) {
Log.d("List :", response.body().toString())
val popularDTO = response.body()
val listMoviesDTO = popularDTO?.results
listMoviesDTO?.forEach {
val tvShow = MediaResultMapper.mapToTvShow(it)
listMovie.add(tvShow)
Log.d("Movie ", tvShow.name )
}
}
callback(listMovie)
}
override fun onFailure(call: Call<PopularDTO>, t: Throwable) {
Log.d("Error failure", t.message.toString())
}
})
}
}

@ -5,26 +5,20 @@ import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.view.Menu
import android.view.View
import android.widget.SearchView.OnQueryTextListener
import androidx.appcompat.widget.SearchView
import androidx.fragment.app.Fragment
import com.google.android.material.bottomnavigation.BottomNavigationView
import fr.iut.pm.movieapplication.R
import fr.iut.pm.movieapplication.api.RetrofitInstance
import fr.iut.pm.movieapplication.api.config.GlobalImageConfig
import fr.iut.pm.movieapplication.repository.MediaRepository
import fr.iut.pm.movieapplication.repository.MovieRepository
import fr.iut.pm.movieapplication.ui.fragments.HomeSectionsFragment
import fr.iut.pm.movieapplication.ui.fragments.MoviesFragment
import fr.iut.pm.movieapplication.ui.fragments.ShowsFragment
import fr.iut.pm.movieapplication.utils.Constants
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch
import retrofit2.awaitResponse
import fr.iut.pm.movieapplication.ui.fragments.TvShowsFragment
class MainActivity : AppCompatActivity() {
val movieRepository : MovieRepository = MovieRepository()
val mediaRepository : MediaRepository = MediaRepository()
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
@ -47,7 +41,7 @@ class MainActivity : AppCompatActivity() {
}
R.id.series_page -> {
loadFragments(ShowsFragment(this))
loadFragments(TvShowsFragment(this))
return@setOnItemSelectedListener true
}
else -> false

@ -10,16 +10,16 @@ import androidx.core.net.toUri
import androidx.recyclerview.widget.RecyclerView
import coil.load
import fr.iut.pm.movieapplication.R
import fr.iut.pm.movieapplication.api.config.GlobalImageConfig
import fr.iut.pm.movieapplication.model.media.movie.Movie
import fr.iut.pm.movieapplication.model.media.tvshow.TvShow
import fr.iut.pm.movieapplication.ui.activity.MainActivity
import fr.iut.pm.movieapplication.utils.Constants
import fr.iut.pm.movieapplication.utils.Constants.Companion.IMG_URL
class MovieAdapter(
class CategoryAdapter<T>(
private val context: MainActivity,
private val layoutId: Int,
private val list: List<Movie>
) : RecyclerView.Adapter<HomeItemAdapter.ViewHolder>(){
private val list: List<T>
) : RecyclerView.Adapter<MediaAdapter.ViewHolder>(){
class ViewHolder(view : View) : RecyclerView.ViewHolder(view) {
val itemImage: ImageView = view.findViewById<ImageView>(R.id.item_image)
@ -28,29 +28,40 @@ class MovieAdapter(
}
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): HomeItemAdapter.ViewHolder {
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): MediaAdapter.ViewHolder {
val view = LayoutInflater
.from(parent.context)
.inflate(layoutId, parent, false)
return HomeItemAdapter.ViewHolder(view)
return MediaAdapter.ViewHolder(view)
}
override fun getItemCount(): Int = list.size
override fun onBindViewHolder(holder: HomeItemAdapter.ViewHolder, position: Int) {
override fun onBindViewHolder(holder: MediaAdapter.ViewHolder, position: Int) {
val currentItem = list[position]
Log.d("SINGLETON", GlobalImageConfig.baseUrl)
val imgUri = currentItem.posterPath?.let {
(Constants.IMG_URL + it).toUri().buildUpon().scheme("https").build()
if(currentItem != null) {
when(currentItem!!::class.java) {
Movie::class.java -> bindMovie(holder, currentItem as Movie)
TvShow::class.java -> bindTvShow(holder, currentItem as TvShow)
}
}
}
Log.d("SINGLETON", imgUri.toString() )
private fun bindTvShow(holder: MediaAdapter.ViewHolder, tvShow: TvShow) {
val imgUri = tvShow.posterPath?.let { (IMG_URL+it).toUri().buildUpon().scheme("https").build() }
holder.itemImage.load(imgUri)
holder.itemName.text = currentItem.title
holder.itemDate.text = currentItem.releaseDate
holder.itemView.setOnClickListener {
onItemClick(currentItem)
holder.itemName.text = tvShow.name
holder.itemDate.text = tvShow.firstAirDate
}
private fun bindMovie(holder: MediaAdapter.ViewHolder, movie: Movie) {
val imgUri = movie.posterPath?.let { (IMG_URL+it).toUri().buildUpon().scheme("https").build() }
holder.itemImage.load(imgUri)
holder.itemName.text = movie.title
holder.itemDate.text = movie.releaseDate
}
private fun onItemClick(item : Movie) {

@ -12,17 +12,14 @@ import coil.load
import fr.iut.pm.movieapplication.R
import fr.iut.pm.movieapplication.api.config.GlobalImageConfig
import fr.iut.pm.movieapplication.model.media.MediaResult
import fr.iut.pm.movieapplication.model.media.movie.Movie
import fr.iut.pm.movieapplication.model.media.movie.MovieDetails
import fr.iut.pm.movieapplication.model.media.tvshow.TvShow
import fr.iut.pm.movieapplication.ui.activity.MainActivity
import fr.iut.pm.movieapplication.utils.Constants.Companion.IMG_URL
class HomeItemAdapter(
class MediaAdapter(
private val context: MainActivity,
private val layoutId: Int,
private val list: List<MediaResult>
) : RecyclerView.Adapter<HomeItemAdapter.ViewHolder>() {
) : RecyclerView.Adapter<MediaAdapter.ViewHolder>() {
class ViewHolder(view : View) : RecyclerView.ViewHolder(view) {
val itemImage: ImageView = view.findViewById<ImageView>(R.id.item_image)
@ -38,21 +35,36 @@ class HomeItemAdapter(
}
override fun onBindViewHolder(holder: ViewHolder, position: Int) {
val currentItem = list[position]
when(currentItem.mediaType) {
"movie" -> bindMovie(holder, currentItem)
"tv" -> bindTvShow(holder, currentItem)
}
Log.d("SINGLETON", GlobalImageConfig.baseUrl)
val imgUri = currentItem.posterPath?.let {
(IMG_URL + it).toUri().buildUpon().scheme("https").build()
}
Log.d("SINGLETON", imgUri.toString() )
holder.itemImage.load(imgUri)
holder.itemName.text = currentItem.title
holder.itemDate.text = currentItem.releaseDate
holder.itemView.setOnClickListener {
onItemClick(currentItem)
}
}
// If the item is a Movie
private fun bindMovie(holder: ViewHolder, currentItem: MediaResult) {
holder.itemName.text = currentItem.title
holder.itemDate.text = currentItem.releaseDate
}
// If the item is a TvShow
private fun bindTvShow(holder: ViewHolder, currentItem: MediaResult) {
holder.itemName.text = currentItem.name
holder.itemDate.text = currentItem.firstAirDate
}
private fun onItemClick(item : MediaResult) {
Log.d("item clicked", item.toString())
}

@ -8,9 +8,9 @@ import androidx.fragment.app.Fragment
import androidx.recyclerview.widget.RecyclerView
import fr.iut.pm.movieapplication.R
import fr.iut.pm.movieapplication.ui.activity.MainActivity
import fr.iut.pm.movieapplication.ui.adapter.HomeItemAdapter
import fr.iut.pm.movieapplication.ui.adapter.MediaAdapter
import fr.iut.pm.movieapplication.ui.adapter.HomeItemDecoration
import fr.iut.pm.movieapplication.ui.adapter.MovieAdapter
import fr.iut.pm.movieapplication.ui.adapter.CategoryAdapter
import fr.iut.pm.movieapplication.ui.viewmodel.HomeSectionsVM
class HomeSectionsFragment(
@ -23,21 +23,21 @@ class HomeSectionsFragment(
val view = inflater.inflate(R.layout.fragment_home_sections, container, false)
//get the trends RecyclerView
context.movieRepository.getTrends {
context.mediaRepository.getTrends {
val homeTrendsRecyclerView = view?.findViewById<RecyclerView>(R.id.home_trends_recycler_view)
homeTrendsRecyclerView?.adapter = HomeItemAdapter(context,R.layout.item_horizontal_home_page,it)
homeTrendsRecyclerView?.adapter = MediaAdapter(context,R.layout.item_horizontal_home_page,it)
homeTrendsRecyclerView?.addItemDecoration(HomeItemDecoration())
}
//get the popularity RecyclerView
context.movieRepository.getPopularMovies {
val homePopularityRecyclerView = view?.findViewById<RecyclerView>(R.id.home_popularity_recycler_view)
homePopularityRecyclerView?.adapter = MovieAdapter(context,R.layout.item_horizontal_home_page,it)
homePopularityRecyclerView?.adapter = CategoryAdapter(context,R.layout.item_horizontal_home_page,it)
homePopularityRecyclerView?.addItemDecoration(HomeItemDecoration())
}
//get the free RecyclerView
val homeFreeRecyclerView = view?.findViewById<RecyclerView>(R.id.home_free_recycler_view)
homeFreeRecyclerView?.adapter = HomeItemAdapter(context,R.layout.item_horizontal_home_page,ArrayList())
homeFreeRecyclerView?.adapter = MediaAdapter(context,R.layout.item_horizontal_home_page,ArrayList())
homeFreeRecyclerView?.addItemDecoration(HomeItemDecoration())
return view
}

@ -4,18 +4,18 @@ import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.AdapterView
import android.widget.ArrayAdapter
import android.widget.Spinner
import androidx.fragment.app.Fragment
import androidx.fragment.app.viewModels
import androidx.recyclerview.widget.GridLayoutManager
import androidx.recyclerview.widget.RecyclerView
import fr.iut.pm.movieapplication.R
import fr.iut.pm.movieapplication.model.media.MediaResult
import fr.iut.pm.movieapplication.model.media.movie.Movie
import fr.iut.pm.movieapplication.model.media.movie.MovieDetails
import fr.iut.pm.movieapplication.repository.MovieRepository
import fr.iut.pm.movieapplication.ui.activity.MainActivity
import fr.iut.pm.movieapplication.ui.adapter.HomeItemAdapter
import fr.iut.pm.movieapplication.ui.adapter.MovieAdapter
import fr.iut.pm.movieapplication.ui.adapter.CategoryAdapter
import fr.iut.pm.movieapplication.ui.viewmodel.MoviesVM
import fr.iut.pm.movieapplication.ui.viewmodel.MoviesVMFactory
import fr.iut.pm.movieapplication.utils.Constants.Companion.PAGE_SIZE
@ -31,6 +31,8 @@ class MoviesFragment(
private val moviesVM: MoviesVM by viewModels{ MoviesVMFactory(repository = MovieRepository())}
lateinit var moviesRecyclerView : RecyclerView
lateinit var spinner: Spinner
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
val view = inflater.inflate(R.layout.fragment_movies, container, false)
@ -38,11 +40,7 @@ class MoviesFragment(
moviesRecyclerView = view.findViewById<RecyclerView>(R.id.movies_item_recycler_view)
// Initialized the data inside our RecyclerView
context.movieRepository.getPopularMovies { listMovies ->
currentList.addAll(0,listMovies)
moviesRecyclerView.adapter = MovieAdapter(context, R.layout.item_vertical_fragment, currentList)
moviesRecyclerView.layoutManager = GridLayoutManager (context, 3)
}
// Create the ScrollListener
val scrollListener = object : RecyclerView.OnScrollListener() {
@ -69,9 +67,73 @@ class MoviesFragment(
// Add the ScrollLister created before to our RecyclerView
moviesRecyclerView.addOnScrollListener(scrollListener)
spinner = view.findViewById(R.id.category_spinner)
configSpinner(spinner)
return view
}
private fun configSpinner(spinner: Spinner) {
ArrayAdapter.createFromResource(
context,
R.array.movie_filter,
android.R.layout.simple_spinner_item
).also { adapter ->
adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item)
spinner.adapter = adapter
}
spinner.onItemSelectedListener = object : AdapterView.OnItemSelectedListener {
override fun onItemSelected(
parent: AdapterView<*>?,
view: View?,
position: Int,
id: Long
) {
when(position) {
0 -> {
currentList.clear()
context.movieRepository.getPopularMovies { listMovies ->
currentList.addAll(0,listMovies)
moviesRecyclerView.adapter = CategoryAdapter(context, R.layout.item_vertical_fragment, currentList)
moviesRecyclerView.layoutManager = GridLayoutManager (context, 3)
}
}
1 -> {
currentList.clear()
context.movieRepository.getNowPlayingMovies { movies: List<Movie> ->
currentList.addAll(0,movies)
moviesRecyclerView.adapter = CategoryAdapter(context, R.layout.item_vertical_fragment, currentList)
moviesRecyclerView.layoutManager = GridLayoutManager (context, 3)
}
}
2 -> {
currentList.clear()
context.movieRepository.getUpcomingMovies { movies: List<Movie> ->
currentList.addAll(0,movies)
moviesRecyclerView.adapter = CategoryAdapter(context, R.layout.item_vertical_fragment, currentList)
moviesRecyclerView.layoutManager = GridLayoutManager (context, 3)
}
}
3 -> {
currentList.clear()
context.movieRepository.getTopRatedMovies { movies ->
currentList.addAll(0,movies)
moviesRecyclerView.adapter = CategoryAdapter(context, R.layout.item_vertical_fragment, currentList)
moviesRecyclerView.layoutManager = GridLayoutManager (context, 3)
}
}
}
}
override fun onNothingSelected(parent: AdapterView<*>?) {
}
}
}
/**
* Method to load data when the user reaches the bottom of the view
*/
@ -82,12 +144,34 @@ class MoviesFragment(
if(currentPage == 1000) isLastPage = true
val start = currentList.size
context.movieRepository.getPopularMovies(currentPage) { listMovies ->
when(spinner.selectedItemPosition) {
0 -> {
context.movieRepository.getPopularMovies(currentPage) { listMovies ->
currentList.addAll(start, listMovies)
moviesRecyclerView.adapter?.notifyItemRangeChanged(start, listMovies.size)
}
}
1 -> {
context.movieRepository.getNowPlayingMovies(currentPage) { listMovies ->
currentList.addAll(start, listMovies)
moviesRecyclerView.adapter?.notifyItemRangeChanged(start, listMovies.size)
}
}
2 -> {
context.movieRepository.getUpcomingMovies(currentPage) { listMovies ->
currentList.addAll(start, listMovies)
moviesRecyclerView.adapter?.notifyItemRangeChanged(start, listMovies.size)
}
}
3 -> {
context.movieRepository.getTopRatedMovies(currentPage) { listMovies ->
currentList.addAll(start, listMovies)
moviesRecyclerView.adapter?.notifyItemRangeChanged(start, listMovies.size)
}
}
}
isLoading = false
}

@ -4,7 +4,7 @@ import android.os.Bundle
import androidx.fragment.app.Fragment
import fr.iut.pm.movieapplication.ui.activity.MainActivity
class ShowsFragment(
class TvShowsFragment(
private val context : MainActivity
) : Fragment() {

@ -28,7 +28,7 @@ object MediaResultMapper {
fun mapToMovie(mediaResultDTO: MediaResultDTO): Movie {
return Movie(
posterPath = mediaResultDTO.posterPath,
adult = mediaResultDTO.adult == false,
adult = !mediaResultDTO.adult,
overview = mediaResultDTO.overview,
releaseDate = mediaResultDTO.releaseDate!!,
genreIds = mediaResultDTO.genreIds,
@ -47,7 +47,7 @@ object MediaResultMapper {
fun mapToMediaResult(mediaResultDTO: MediaResultDTO) : MediaResult {
return MediaResult(
posterPath = mediaResultDTO.posterPath,
adult = mediaResultDTO.adult == false,
adult = !mediaResultDTO.adult,
overview = mediaResultDTO.overview,
firstAirDate = mediaResultDTO.firstAirDate,
releaseDate = mediaResultDTO.releaseDate,

@ -2,8 +2,20 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
xmlns:app="http://schemas.android.com/apk/res-auto">
<Spinner
android:id="@+id/category_spinner"
android:layout_width="match_parent"
android:layout_height="48dp"
android:layout_marginLeft="@dimen/default_margin"
android:layout_marginStart="@dimen/default_margin"
android:layout_marginEnd="@dimen/default_margin"
android:layout_marginTop="@dimen/default_margin"
android:layout_marginBottom="@dimen/default_margin"
android:background="@color/light_grey"
android:layout_marginRight="@dimen/default_margin" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/movies_item_recycler_view"
android:layout_width="match_parent"

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/tv_shows_item_recycler_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginBottom="@dimen/default_margin"
/>
</androidx.constraintlayout.widget.ConstraintLayout>

@ -14,4 +14,12 @@
<string name="home_page_free_section_title">Gratuits</string>
<string name="section_nested_scroll_view">section_nested_scroll_view</string>
<!-- Category page -->
<string-array name="movie_filter">
<item>Populaires</item>
<item>Du moment</item>
<item>À venir</item>
<item>Les mieux notés</item>
</string-array>
</resources>
Loading…
Cancel
Save