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

Pokemon List Pagination

Offen
#2 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
enhancement
Vorherrschende Sprache
Kotlin
Sterne
0
Forks
1
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

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.

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.