akai-org / akai-org/Mobile-learning-pokemons

Pokemon List Pagination

Abierto
#2 0 comentarios 0 reacciones 0 asignados Ver en GitHub
enhancement
Lenguaje dominante
Kotlin
Estrellas
0
Forks
1
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

As you can see we specify query parameters of every request: offset and limit. and we always use them with values 0 and 20.
With this, we always get only responses with 20 first pokemon from API. However, we'd like to get all of them. We could just get rid of those query parameters but it would me our application call for above 1000 pokemons. It could be a bad performance. What we can do is request another 20 pokemons when user scrolls the list so every time we actually want to see more pokemons - we call the api to fetch them.

If you'd like to learn more about pagination in android here are some useful links:

- https://en.wikipedia.org/wiki/Pagination
- https://developer.android.com/topic/libraries/architecture/paging (an android library)
- https://www.youtube.com/watch?v=D6Eus3f6U9I
- https://www.youtube.com/watch?v=ejSY4WobG58

If you'd like to implement a pagination in our app - good luck and feel free to ask for help or any extra materials.

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.