https://kotlinlang.org logo
Title
n

Napa Ram

01/07/2022, 7:21 AM
Hi, i am creating app in compose and designer give me UI with 4 tab and inside every tab in need to show list and it should be searchable with any of column, So my problem is there are around 500 record on every tab so whenever user click on tab api should get called and fetch data from server and always show first 10 record at a time and then add navigation like move to next page it should next record if he click on last page then it should move to last 10 record i Attached UI for reference Btw i am creatiing UI for tablet Thanks in advance for help
👎 2
b

Benoît

01/07/2022, 10:01 AM
You didn't ask any question. Seems like what you should do is simply fetch the data from your backend when the "next" button is clicked
n

Napa Ram

01/07/2022, 10:39 AM
What's best way to handle pagination and when user search it should on all record
b

Benoît

01/07/2022, 10:55 AM
You can use Jetpack's Pagination library to handle pagination For the search you simply need to have all the data in your Repository and the search should be quiet trivial
c

Colton Idle

01/08/2022, 1:44 AM
use pagination library or just use pagination yourself. nothing here is really compose related.