hsu-hsu / nimble-survey-app

This is an application that allows users to browse a list of surveys.
0 stars 0 forks source link

[Feature] Pagination support #13

Open minhnimble opened 8 months ago

minhnimble commented 8 months ago

Issue

As you can probably see from the Postman, the Surveys List API should be capable of providing more data than what the application currently displays. Currently, the data shown on the Surveys List screen is only fixed to a page of 5 items. As a result, there is no way for the user to see all the data available from the API response.

Get survey logic: https://github.com/hsu-hsu/nimble-survey-app/blob/81c798e104ee3a1fa125d72e060540d0ac316a86/app/src/main/java/com/nimble/android/features/home/HomeViewModel.kt#L32-L41

Page configs: https://github.com/hsu-hsu/nimble-survey-app/blob/81c798e104ee3a1fa125d72e060540d0ac316a86/app/src/main/java/com/nimble/android/utils/Constants.kt#L10-L11

Expect

The application could paginate to load all the survey list data by using some user inputs (swipe to the last survey item to trigger the load more action, add the load next page button, etc.).

hsu-hsu commented 8 months ago

I add a snackbar to get user input data for displaying more surveys in this pull request. pull request -> #22

hsu-hsu commented 8 months ago

Can I ask you about this one? I think I show a snackbar to user to load more data and it work well.