Processing and updating Android list data

Asked 2 years ago, Updated 2 years ago, 29 views

Communicate with the web server on Android and receive it in JSON format through RecyclerView

It's representing.

A few dozen cases of data appear through RecyclerView without delay

So we did hundreds and thousands of tests.

The communication is using Retrofit1.9, and I took a log and checked it.

There is no delay in receiving JSON data, but from receiving it to displaying it on the screen

It takes more than 5 seconds.

I wonder how the applications in service usually work when you distribute the data to the list.

After receiving all the data, are you going to share the data and update it?

I don't know how to solve it because I don't have experience.

It would be helpful if you could tell me examples or keywords.

If the logic is wrong, I will attach the code.

I thought of this while asking, should I update the screen that will be shown first on the adapter and then process the rest of the data?

Below is the test screen.

android

2022-09-21 21:52

1 Answers

If you have a large number of data, the server usually uses pagenation to number pages and lower only the data on a particular page. On the hash code website, 1, 2, 3, 5, 6... Like this, there is a page number at the bottom of the post list. You can think of this part.

mobile using the same techniques. (for example, 30) of all the appropriate size, and not download data to the data was received and how you show on the screen. In the singularity is mobile, infinite scrolling ux are optimized for mobile called (endless scrolling). Scroll the page to reach the bottom of the detection techniques that received the data on the next page. Many apps store, and so on play, Pinterest, Twitter used this way. (see image below)

.

There are many related libraries, including articles on how to implement them, so you can implement them without difficulty.


2022-09-21 21:52

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.